##// END OF EJS Templates
tests: avoid referring to pvec in demandimport test...
Martin von Zweigbergk -
r36265:c2c5f9f6 default
parent child Browse files
Show More
@@ -41,6 +41,17 b' print("node =", f(node))'
41 41 del os.environ['HGDEMANDIMPORT']
42 42 demandimport.enable()
43 43
44 # Test access to special attributes through demandmod proxy
45 from mercurial import error as errorproxy
46 print("errorproxy =", f(errorproxy))
47 print("errorproxy.__doc__ = %r"
48 % (' '.join(errorproxy.__doc__.split()[:3]) + ' ...'))
49 print("errorproxy.__name__ = %r" % errorproxy.__name__)
50 # __name__ must be accessible via __dict__ so the relative imports can be
51 # resolved
52 print("errorproxy.__dict__['__name__'] = %r" % errorproxy.__dict__['__name__'])
53 print("errorproxy =", f(errorproxy))
54
44 55 import os
45 56
46 57 print("os =", f(os))
@@ -79,17 +90,6 b' print("re =", f(re))'
79 90 print("re.stderr =", f(re.stderr))
80 91 print("re =", f(re))
81 92
82 # Test access to special attributes through demandmod proxy
83 from mercurial import pvec as pvecproxy
84 print("pvecproxy =", f(pvecproxy))
85 print("pvecproxy.__doc__ = %r"
86 % (' '.join(pvecproxy.__doc__.split()[:3]) + ' ...'))
87 print("pvecproxy.__name__ = %r" % pvecproxy.__name__)
88 # __name__ must be accessible via __dict__ so the relative imports can be
89 # resolved
90 print("pvecproxy.__dict__['__name__'] = %r" % pvecproxy.__dict__['__name__'])
91 print("pvecproxy =", f(pvecproxy))
92
93 93 import contextlib
94 94 print("contextlib =", f(contextlib))
95 95 try:
@@ -1,4 +1,9 b''
1 1 node = <module 'mercurial.node' from '?'>
2 errorproxy = <unloaded module 'error'>
3 errorproxy.__doc__ = 'Mercurial exceptions. This ...'
4 errorproxy.__name__ = 'mercurial.error'
5 errorproxy.__dict__['__name__'] = 'mercurial.error'
6 errorproxy = <proxied module 'error'>
2 7 os = <unloaded module 'os'>
3 8 os.system = <built-in function system>
4 9 os = <module 'os' from '?'>
@@ -19,11 +24,6 b" remod = <module 're' from '?'>"
19 24 re = <unloaded module 'sys'>
20 25 re.stderr = <open file '<whatever>', mode 'w' at 0x?>
21 26 re = <proxied module 'sys'>
22 pvecproxy = <unloaded module 'pvec'>
23 pvecproxy.__doc__ = 'A "pvec" is ...'
24 pvecproxy.__name__ = 'mercurial.pvec'
25 pvecproxy.__dict__['__name__'] = 'mercurial.pvec'
26 pvecproxy = <proxied module 'pvec'>
27 27 contextlib = <unloaded module 'contextlib'>
28 28 contextlib.unknownattr = ImportError: cannot import name unknownattr
29 29 __import__('contextlib', ..., ['unknownattr']) = <module 'contextlib' from '?'>
General Comments 0
You need to be logged in to leave comments. Login now