Skip to content

Commit

Permalink
[3.12] pythongh-107178: Add the C API tests for the Abstract Objects …
Browse files Browse the repository at this point in the history
…Layer (pythonGH-107179)

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 16c9415)

Co-authored-by: Serhiy Storchaka <[email protected]>
  • Loading branch information
serhiy-storchaka committed Aug 7, 2023
1 parent e5582bd commit 6e9cbc9
Show file tree
Hide file tree
Showing 13 changed files with 1,955 additions and 299 deletions.
2 changes: 1 addition & 1 deletion Lib/test/test_bytes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ def do_tests(setitem):
except ValueError:
pass
try:
setitem(b, 0, None)
setitem(b, 0, object())
self.fail("Didn't raise TypeError")
except TypeError:
pass
Expand Down
Loading

0 comments on commit 6e9cbc9

Please sign in to comment.