@@ -4553,11 +4553,6 @@ class Quadruple(Enum):
4553
4553
COMPLEX_A = 2j
4554
4554
COMPLEX_B = 3j
4555
4555
4556
- class _ModuleWrapper :
4557
- """We use this class as a namespace for swapping modules."""
4558
- def __init__ (self , module ):
4559
- self .__dict__ .update (module .__dict__ )
4560
-
4561
4556
class TestConvert (unittest .TestCase ):
4562
4557
def tearDown (self ):
4563
4558
# Reset the module-level test variables to their original integer
@@ -4597,12 +4592,6 @@ def test_convert_int(self):
4597
4592
self .assertEqual (test_type .CONVERT_TEST_NAME_D , 5 )
4598
4593
self .assertEqual (test_type .CONVERT_TEST_NAME_E , 5 )
4599
4594
# Ensure that test_type only picked up names matching the filter.
4600
- int_dir = dir (int ) + [
4601
- 'CONVERT_TEST_NAME_A' , 'CONVERT_TEST_NAME_B' , 'CONVERT_TEST_NAME_C' ,
4602
- 'CONVERT_TEST_NAME_D' , 'CONVERT_TEST_NAME_E' , 'CONVERT_TEST_NAME_F' ,
4603
- 'CONVERT_TEST_SIGABRT' , 'CONVERT_TEST_SIGIOT' ,
4604
- 'CONVERT_TEST_EIO' , 'CONVERT_TEST_EBUS' ,
4605
- ]
4606
4595
extra = [name for name in dir (test_type ) if name not in enum_dir (test_type )]
4607
4596
missing = [name for name in enum_dir (test_type ) if name not in dir (test_type )]
4608
4597
self .assertEqual (
@@ -4644,7 +4633,6 @@ def test_convert_str(self):
4644
4633
self .assertEqual (test_type .CONVERT_STR_TEST_1 , 'hello' )
4645
4634
self .assertEqual (test_type .CONVERT_STR_TEST_2 , 'goodbye' )
4646
4635
# Ensure that test_type only picked up names matching the filter.
4647
- str_dir = dir (str ) + ['CONVERT_STR_TEST_1' , 'CONVERT_STR_TEST_2' ]
4648
4636
extra = [name for name in dir (test_type ) if name not in enum_dir (test_type )]
4649
4637
missing = [name for name in enum_dir (test_type ) if name not in dir (test_type )]
4650
4638
self .assertEqual (
@@ -4712,8 +4700,6 @@ def member_dir(member):
4712
4700
allowed .add (name )
4713
4701
return sorted (allowed )
4714
4702
4715
- missing = object ()
4716
-
4717
4703
4718
4704
if __name__ == '__main__' :
4719
4705
unittest .main ()
0 commit comments