Skip to content

Commit 2732a22

Browse files
committed
Fix separated running of pickle tests
1 parent cc39b19 commit 2732a22

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Lib/test/pickletester.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2289,10 +2289,10 @@ def test_nested_lookup_error(self):
22892289
with self.subTest(proto=proto):
22902290
with self.assertRaises(pickle.PicklingError) as cm:
22912291
self.dumps(obj, proto)
2292-
self.assertEqual(str(cm.exception),
2293-
f"Can't pickle {obj!r}: it's not found as __main__.AbstractPickleTests.spam")
2294-
self.assertEqual(str(cm.exception.__context__),
2295-
"module '__main__' has no attribute 'AbstractPickleTests'")
2292+
self.assertEqual(str(cm.exception),
2293+
f"Can't pickle {obj!r}: it's not found as __main__.AbstractPickleTests.spam")
2294+
self.assertEqual(str(cm.exception.__context__),
2295+
"module '__main__' has no attribute 'AbstractPickleTests'")
22962296

22972297
def test_wrong_object_lookup_error(self):
22982298
# Name is bound to different object
@@ -2312,10 +2312,10 @@ def test_wrong_object_lookup_error(self):
23122312
with self.subTest(proto=proto):
23132313
with self.assertRaises(pickle.PicklingError) as cm:
23142314
self.dumps(obj, proto)
2315-
self.assertEqual(str(cm.exception),
2316-
f"Can't pickle {obj!r}: it's not found as __main__.AbstractPickleTests")
2317-
self.assertEqual(str(cm.exception.__context__),
2318-
"module '__main__' has no attribute 'AbstractPickleTests'")
2315+
self.assertEqual(str(cm.exception),
2316+
f"Can't pickle {obj!r}: it's not found as __main__.AbstractPickleTests")
2317+
self.assertEqual(str(cm.exception.__context__),
2318+
"module '__main__' has no attribute 'AbstractPickleTests'")
23192319

23202320
def test_local_lookup_error(self):
23212321
# Test that whichmodule() errors out cleanly when looking up

0 commit comments

Comments
 (0)