Show More
@@ -232,7 +232,7 b' from mercurial import util' | |||||
232 | # Unlike the import statement, __import__() function should not raise |
|
232 | # Unlike the import statement, __import__() function should not raise | |
233 | # ImportError even if fromlist has an unknown item |
|
233 | # ImportError even if fromlist has an unknown item | |
234 | # (see Python/import.c:import_module_level() and ensure_fromlist()) |
|
234 | # (see Python/import.c:import_module_level() and ensure_fromlist()) | |
235 |
assert ' |
|
235 | assert 'ftplib' not in sys.modules | |
236 |
zipfileimp = __import__(' |
|
236 | zipfileimp = __import__('ftplib', globals(), locals(), ['unknownattr']) | |
237 |
assert f(zipfileimp) == "<module ' |
|
237 | assert f(zipfileimp) == "<module 'ftplib' from '?'>", f(zipfileimp) | |
238 | assert not util.safehasattr(zipfileimp, 'unknownattr') |
|
238 | assert not util.safehasattr(zipfileimp, 'unknownattr') |
General Comments 0
You need to be logged in to leave comments.
Login now