##// END OF EJS Templates
tests: make test-check-module-imports more robust...
Valentin Gatien-Baron -
r40723:dd028bca default
parent child Browse files
Show More
@@ -260,10 +260,12 b' def list_stdlib_modules():'
260 260 break
261 261 else:
262 262 stdlib_prefixes.add(dirname)
263 sourceroot = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
263 264 for libpath in sys.path:
264 # We want to walk everything in sys.path that starts with
265 # something in stdlib_prefixes.
266 if not any(libpath.startswith(p) for p in stdlib_prefixes):
265 # We want to walk everything in sys.path that starts with something in
266 # stdlib_prefixes, but not directories from the hg sources.
267 if (os.path.abspath(libpath).startswith(sourceroot)
268 or not any(libpath.startswith(p) for p in stdlib_prefixes)):
267 269 continue
268 270 for top, dirs, files in os.walk(libpath):
269 271 for i, d in reversed(list(enumerate(dirs))):
General Comments 0
You need to be logged in to leave comments. Login now