You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After working on #100817 I've noticed that there are multiple things that can be improved in terms of copy module tests:
First of all, I had submitted some broken code in gh-100817: Speed up copy.deepcopy calls on slice objects #100818 but, our test cases were not able to detect it. Solution: add a new test case in test_slice.py with copy and deepcopy calls. I think it should be in test_slice and not in test_copy, because there's nothing special about it: copy does not change its behaviour or special case it.
This test ensures that after modifing copyreg we can now copy an object, but does not assert the result:
After working on #100817 I've noticed that there are multiple things that can be improved in terms of
copymodule tests:copy.deepcopycalls onsliceobjects #100818 but, our test cases were not able to detect it. Solution: add a new test case intest_slice.pywithcopyanddeepcopycalls. I think it should be intest_sliceand not intest_copy, because there's nothing special about it:copydoes not change its behaviour or special case it.copyregwe can now copy an object, but does not assert the result:cpython/Lib/test/test_copy.py
Lines 42 to 55 in e47b139
cpython/Lib/test/test_copy.py
Lines 302 to 315 in e47b139
test_deepcopy_atomicmisses several important types:bytes,types.EllipsisType,NotImplementedType.cpython/Lib/test/test_copy.py
Lines 350 to 359 in e47b139
PR is incoming.
Linked PRs
copymodule tests #100872copymodule tests (GH-100872) #100975copymodule tests (GH-100872) #100976