Show More
@@ -9,6 +9,7 b' import types' | |||||
9 |
|
9 | |||
10 | # Don't import pycompat because it has too many side-effects. |
|
10 | # Don't import pycompat because it has too many side-effects. | |
11 | ispy3 = sys.version_info[0] >= 3 |
|
11 | ispy3 = sys.version_info[0] >= 3 | |
|
12 | ispy311 = (sys.version_info.major, sys.version_info.minor) >= (3, 11) | |||
12 |
|
13 | |||
13 | # Only run if demandimport is allowed |
|
14 | # Only run if demandimport is allowed | |
14 | if subprocess.call( |
|
15 | if subprocess.call( | |
@@ -106,12 +107,18 b' import os' | |||||
106 |
|
107 | |||
107 | if ispy3: |
|
108 | if ispy3: | |
108 | assert not isinstance(os, _LazyModule) |
|
109 | assert not isinstance(os, _LazyModule) | |
109 | assert f(os) == "<module 'os' from '?'>", f(os) |
|
110 | if ispy311: | |
|
111 | assert f(os) == "<module 'os' (frozen)>", f(os) | |||
|
112 | else: | |||
|
113 | assert f(os) == "<module 'os' from '?'>", f(os) | |||
110 | else: |
|
114 | else: | |
111 | assert f(os) == "<unloaded module 'os'>", f(os) |
|
115 | assert f(os) == "<unloaded module 'os'>", f(os) | |
112 |
|
116 | |||
113 | assert f(os.system) == '<built-in function system>', f(os.system) |
|
117 | assert f(os.system) == '<built-in function system>', f(os.system) | |
114 | assert f(os) == "<module 'os' from '?'>", f(os) |
|
118 | if ispy311: | |
|
119 | assert f(os) == "<module 'os' (frozen)>", f(os) | |||
|
120 | else: | |||
|
121 | assert f(os) == "<module 'os' from '?'>", f(os) | |||
115 |
|
122 | |||
116 | assert 'mercurial.utils.procutil' not in sys.modules |
|
123 | assert 'mercurial.utils.procutil' not in sys.modules | |
117 | from mercurial.utils import procutil |
|
124 | from mercurial.utils import procutil |
General Comments 0
You need to be logged in to leave comments.
Login now