Skip to content

Commit

Permalink
pythongh-107178: Add the C API tests for the Abstract Objects Layer (p…
Browse files Browse the repository at this point in the history
…ythonGH-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.
  • Loading branch information
serhiy-storchaka authored Aug 7, 2023
1 parent 8579327 commit 16c9415
Show file tree
Hide file tree
Showing 13 changed files with 2,174 additions and 297 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 16c9415

Please sign in to comment.