@@ -404,7 +404,7 @@ def assert_exc_args_equal(self, exc1, exc2):
404404 # Currently the "extra" attrs are not preserved
405405 # (via __reduce__).
406406 self .assertIs (type (exc1 ), type (exc2 ))
407- # self.assert_exc_equal(grouped1, grouped2)
407+ self .assert_exc_equal (grouped1 , grouped2 )
408408 else :
409409 self .assertEqual (args1 , args2 )
410410
@@ -435,7 +435,6 @@ def assert_exc_equal(self, exc1, exc2):
435435 def assert_equal_or_equalish (self , obj , expected ):
436436 cls = type (expected )
437437 if cls .__eq__ is not object .__eq__ :
438- # assert cls not in (types.MethodType, types.BuiltinMethodType, types.MethodWrapperType), cls
439438 self .assertEqual (obj , expected )
440439 elif cls is types .FunctionType :
441440 self .assert_functions_equal (obj , expected )
@@ -723,13 +722,13 @@ def assert_func_defs_same(self, defs):
723722 def assert_func_defs_other_pickle (self , defs , mod ):
724723 # Pickle relative to a different module than the original.
725724 for func in defs .TOP_FUNCTIONS :
726- assert not hasattr (mod , func .__name__ ), (cls , getattr (mod , func .__name__ ))
725+ assert not hasattr (mod , func .__name__ ), (getattr (mod , func .__name__ ), )
727726 self .assert_not_shareable (defs .TOP_FUNCTIONS )
728727
729728 def assert_func_defs_other_unpickle (self , defs , mod , * , fail = False ):
730729 # Unpickle relative to a different module than the original.
731730 for func in defs .TOP_FUNCTIONS :
732- assert not hasattr (mod , func .__name__ ), (cls , getattr (mod , func .__name__ ))
731+ assert not hasattr (mod , func .__name__ ), (getattr (mod , func .__name__ ), )
733732
734733 captured = []
735734 for func in defs .TOP_FUNCTIONS :
@@ -754,7 +753,7 @@ def assert_func_defs_not_shareable(self, defs):
754753 self .assert_not_shareable (defs .TOP_FUNCTIONS )
755754
756755 def test_user_function_normal (self ):
757- # self.assert_roundtrip_equal(defs.TOP_FUNCTIONS)
756+ self .assert_roundtrip_equal (defs .TOP_FUNCTIONS )
758757 self .assert_func_defs_same (defs )
759758
760759 def test_user_func_in___main__ (self ):
@@ -841,7 +840,7 @@ def test_builtin_exception(self):
841840 special = {
842841 BaseExceptionGroup : (msg , [caught ]),
843842 ExceptionGroup : (msg , [caught ]),
844- # UnicodeError: (None, msg, None, None, None),
843+ UnicodeError : (None , msg , None , None , None ),
845844 UnicodeEncodeError : ('utf-8' , '' , 1 , 3 , msg ),
846845 UnicodeDecodeError : ('utf-8' , b'' , 1 , 3 , msg ),
847846 UnicodeTranslateError : ('' , 1 , 3 , msg ),
@@ -1339,8 +1338,8 @@ def test_tuple(self):
13391338
13401339 def test_tuples_containing_non_shareable_types (self ):
13411340 non_shareables = [
1342- EXCEPTION ,
1343- OBJECT ,
1341+ EXCEPTION ,
1342+ OBJECT ,
13441343 ]
13451344 for s in non_shareables :
13461345 value = tuple ([0 , 1.0 , s ])
0 commit comments