@@ -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