tests/test-demandimport.py
changeset 50928 d718eddf01d9
parent 49972 1bd33932713d
child 51744 be227c60a3e0
child 52010 37f693975cbc
--- a/tests/test-demandimport.py	Thu Dec 08 15:33:19 2022 +0100
+++ b/tests/test-demandimport.py	Thu Aug 31 23:56:15 2023 +0200
@@ -179,15 +179,13 @@
         'cannot import name unknownattr'
     )
 
-from mercurial import util
-
 # Unlike the import statement, __import__() function should not raise
 # ImportError even if fromlist has an unknown item
 # (see Python/import.c:import_module_level() and ensure_fromlist())
 assert 'ftplib' not in sys.modules
 zipfileimp = __import__('ftplib', globals(), locals(), ['unknownattr'])
 assert f(zipfileimp) == "<module 'ftplib' from '?'>", f(zipfileimp)
-assert not util.safehasattr(zipfileimp, 'unknownattr')
+assert not hasattr(zipfileimp, 'unknownattr')
 
 
 # test deactivation for issue6725