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
AssertionError: "type object 'AbstractPickleTests' has no attribute 'spam'" != "module '__main__' has no attribute 'AbstractPickleTests'"
- type object 'AbstractPickleTests' has no attribute 'spam'
+ module '__main__' has no attribute 'AbstractPickleTests'
...
AssertionError: "Can'[53 chars]4b0>: it's not the same object as __main__.AbstractPickleTests" != "Can'[53 chars]4b0>: it's not found as __main__.AbstractPickleTests"
- Can't pickle <test.pickletester.REX object at 0x79fcb255a4b0>: it's not the same object as __main__.AbstractPickleTests
? ^^^^^^^^^ ^^^^^
+ Can't pickle <test.pickletester.REX object at 0x79fcb255a4b0>: it's not found as __main__.AbstractPickleTests
?
I'm going to send PR after we decide what the messages should look like
Your PR fixes tests, but I think that it would be better to not use AbstractPickleTests in these tests. For these tests we need an existing global class which does not exist in __main__ . Running tests as a script fails because AbstractPickleTests is imported in test_pickle.py which becomes __main__. #133356 uses this approach.
I ran separate tests for the pickle module on main branch:
I got 24 failures
Judging by the output, the problem is in the mismatch of error messages:
Examples of mismatches:
I'm going to send PR after we decide what the messages should look like
Linked PRs
pickle
tests #133218The text was updated successfully, but these errors were encountered: