gh-156106: Add tests for setting and deleting attributes defined in C - #156107
Open
serhiy-storchaka wants to merge 4 commits into
Open
gh-156106: Add tests for setting and deleting attributes defined in C#156107serhiy-storchaka wants to merge 4 commits into
serhiy-storchaka wants to merge 4 commits into
Conversation
…d in C Test setting a value of an accepted type, of a wrong type and an invalid value, and deleting the attribute, for the attributes defined with PyMemberDef and PyGetSetDef which were not covered.
serhiy-storchaka
requested review from
1st1,
asvetlov,
erlend-aasland,
gpshead,
iritkatriel,
kumaraditya303,
picnixz and
willingc
as code owners
August 20, 2026 11:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tests for the attributes defined with
PyMemberDefandPyGetSetDefwhich were not covered: setting a value of an accepted type, of a wrong type or an invalid value, and deleting the attribute.They are added to the existing tests of the corresponding attributes where such tests exist.
Covered: the plain object members of exceptions,
function.__code__,__doc__and__kwdefaults__,frame.f_trace,f_trace_linesandf_trace_opcodes, the attributes of_ssl._SSLContextand_ssl._SSLSocket,sqlite3isolation_level,arraysizeandautocommit,ctypesraw,contents,argtypes,restypeanderrcheck, the CPicklerandUnpicklerattributes,_io_blksize,_finalizingand_CHUNK_SIZE, the private attributes ofdecimal.Context,defaultdict.default_factory,Future._cancel_messageand the members ofselect.kevent.