# HG changeset patch # User Matt Harbison # Date 1526014731 14400 # Node ID 1d0610fdd63b20c2aa559a0600b9a87e75ee6b20 # Parent 009b424c9cb63f1467603fedbb09a97225161047 tests: migrate demandimport.py away from deprecated `util` module symbols diff -r 009b424c9cb6 -r 1d0610fdd63b tests/test-demandimport.py --- a/tests/test-demandimport.py Thu May 10 22:00:41 2018 -0400 +++ b/tests/test-demandimport.py Fri May 11 00:58:51 2018 -0400 @@ -58,12 +58,12 @@ print("os.system =", f(os.system)) print("os =", f(os)) -from mercurial import util +from mercurial.utils import procutil -print("util =", f(util)) -print("util.system =", f(util.system)) -print("util =", f(util)) -print("util.system =", f(util.system)) +print("procutil =", f(procutil)) +print("procutil.system =", f(procutil.system)) +print("procutil =", f(procutil)) +print("procutil.system =", f(procutil.system)) from mercurial import hgweb print("hgweb =", f(hgweb)) @@ -100,6 +100,8 @@ print('contextlib.unknownattr = ImportError: %s' % rsub(r"'", '', str(inst))) +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()) diff -r 009b424c9cb6 -r 1d0610fdd63b tests/test-demandimport.py.out --- a/tests/test-demandimport.py.out Thu May 10 22:00:41 2018 -0400 +++ b/tests/test-demandimport.py.out Fri May 11 00:58:51 2018 -0400 @@ -7,10 +7,10 @@ os = os.system = os = -util = -util.system = -util = -util.system = +procutil = +procutil.system = +procutil = +procutil.system = hgweb = hgweb_mod = hgweb =