@@ -2970,19 +2970,21 @@ def test__all__(self):
2970
2970
2971
2971
class TestIntEnumConvert (unittest .TestCase ):
2972
2972
def test_convert_value_lookup_priority (self ):
2973
+ # Graalpython change: the test hardcoded test module FQDN which is different under our runner, use __name__
2973
2974
test_type = enum .IntEnum ._convert_ (
2974
2975
'UnittestConvert' ,
2975
- ( 'test.test_enum' , '__main__' )[ __name__ == '__main__' ] ,
2976
+ __name__ ,
2976
2977
filter = lambda x : x .startswith ('CONVERT_TEST_' ))
2977
2978
# We don't want the reverse lookup value to vary when there are
2978
2979
# multiple possible names for a given value. It should always
2979
2980
# report the first lexigraphical name in that case.
2980
2981
self .assertEqual (test_type (5 ).name , 'CONVERT_TEST_NAME_A' )
2981
2982
2982
2983
def test_convert (self ):
2984
+ # Graalpython change: the test hardcoded test module FQDN which is different under our runner, use __name__
2983
2985
test_type = enum .IntEnum ._convert_ (
2984
2986
'UnittestConvert' ,
2985
- ( 'test.test_enum' , '__main__' )[ __name__ == '__main__' ] ,
2987
+ __name__ ,
2986
2988
filter = lambda x : x .startswith ('CONVERT_TEST_' ))
2987
2989
# Ensure that test_type has all of the desired names and values.
2988
2990
self .assertEqual (test_type .CONVERT_TEST_NAME_F ,
@@ -3000,9 +3002,10 @@ def test_convert(self):
3000
3002
'_convert was deprecated in 3.8' )
3001
3003
def test_convert_warn (self ):
3002
3004
with self .assertWarns (DeprecationWarning ):
3005
+ # Graalpython change: the test hardcoded test module FQDN which is different under our runner, use __name__
3003
3006
enum .IntEnum ._convert (
3004
3007
'UnittestConvert' ,
3005
- ( 'test.test_enum' , '__main__' )[ __name__ == '__main__' ] ,
3008
+ __name__ ,
3006
3009
filter = lambda x : x .startswith ('CONVERT_TEST_' ))
3007
3010
3008
3011
@unittest .skipUnless (sys .version_info >= (3 , 9 ),
0 commit comments