tests/test-module-imports.t
changeset 20173 40f79b9a2cc8
parent 20059 385e209377a6
child 20199 d87ed25733a1
--- a/tests/test-module-imports.t	Mon Nov 25 17:18:12 2013 +0100
+++ b/tests/test-module-imports.t	Sat Dec 14 11:58:26 2013 -0500
@@ -2,6 +2,13 @@
 this test on anything earlier.
   $ python -c 'import sys ; assert sys.version_info >= (2, 6)' || exit 80
 
+Virtualenv has a habit of leaving BaseHTTPServer and other modules in
+a place where the import checker is confused about their nature as
+part of the stdlib. Skip the test if BaseHTTPServer's path isn't a
+subpath of sys.prefix.
+
+  $ python -c 'import sys, BaseHTTPServer; assert BaseHTTPServer.__file__.startswith(sys.prefix)' || exit 80
+
   $ import_checker="$TESTDIR"/../contrib/import-checker.py
 Run the doctests from the import checker, and make sure
 it's working correctly.