mirror of
https://github.com/python/cpython.git
synced 2025-08-10 03:49:18 +00:00
[3.12] gh-107178: Add the C API tests for the Abstract Objects Layer (GH-107179) (#107728)
Cover all the Mapping Protocol, almost all the Sequence Protocol
(except PySequence_Fast) and a part of the Object Protocol.
Move existing tests to Lib/test/test_capi/test_abstract.py and
Modules/_testcapi/abstract.c.
Add also tests for PyDict C API..
(cherry picked from commit 16c9415fba
)
This commit is contained in:
parent
72534ca85c
commit
9c8dfcec64
13 changed files with 1955 additions and 299 deletions
|
@ -1354,7 +1354,7 @@ class ByteArrayTest(BaseBytesTest, unittest.TestCase):
|
|||
except ValueError:
|
||||
pass
|
||||
try:
|
||||
setitem(b, 0, None)
|
||||
setitem(b, 0, object())
|
||||
self.fail("Didn't raise TypeError")
|
||||
except TypeError:
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue