mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
[3.13] gh-138584: Increase test coverage for collections.UserList (GH-138590) (#138611)
Some checks are pending
Tests / (push) Blocked by required conditions
Tests / Windows MSI (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if the ABI has changed (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / Android (aarch64) (push) Blocked by required conditions
Tests / Android (x86_64) (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Sanitizers (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
Some checks are pending
Tests / (push) Blocked by required conditions
Tests / Windows MSI (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if the ABI has changed (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / Android (aarch64) (push) Blocked by required conditions
Tests / Android (x86_64) (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Sanitizers (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
gh-138584: Increase test coverage for `collections.UserList` (GH-138590)
Some common tests in `test.list_tests.CommonTest` explicitly tested `list`
instead of testing the underlying list-like type defined in `type2test`.
---------
(cherry picked from commit d7b9ea5cab)
Co-authored-by: dbXD320 <devanshbaghla320@gmail.com>
Co-authored-by: Devansh Baghla <devanshbaghla34@gmail.com>
This commit is contained in:
parent
e5bbcb1605
commit
614c493406
1 changed files with 3 additions and 3 deletions
|
|
@ -31,13 +31,13 @@ class CommonTest(seq_tests.CommonTest):
|
|||
self.assertEqual(a, b)
|
||||
|
||||
def test_getitem_error(self):
|
||||
a = []
|
||||
a = self.type2test([])
|
||||
msg = "list indices must be integers or slices"
|
||||
with self.assertRaisesRegex(TypeError, msg):
|
||||
a['a']
|
||||
|
||||
def test_setitem_error(self):
|
||||
a = []
|
||||
a = self.type2test([])
|
||||
msg = "list indices must be integers or slices"
|
||||
with self.assertRaisesRegex(TypeError, msg):
|
||||
a['a'] = "python"
|
||||
|
|
@ -558,7 +558,7 @@ class CommonTest(seq_tests.CommonTest):
|
|||
class F(object):
|
||||
def __iter__(self):
|
||||
raise KeyboardInterrupt
|
||||
self.assertRaises(KeyboardInterrupt, list, F())
|
||||
self.assertRaises(KeyboardInterrupt, self.type2test, F())
|
||||
|
||||
def test_exhausted_iterator(self):
|
||||
a = self.type2test([1, 2, 3])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue