Fixes #874: do not use __file__ anymore after changing cwd.

This commit is contained in:
Georg Brandl
2012-03-10 18:29:23 +01:00
parent 4ff9c71c91
commit 219905a3be

View File

@@ -22,9 +22,11 @@ if sys.version_info >= (3, 0):
copydir_run_2to3(testroot, newroot)
# switch to the converted dir so nose tests the right tests
chdir(newroot)
# always test the sphinx package from this directory
sys.path.insert(0, path.join(path.dirname(__file__), path.pardir))
# always test the sphinx package from build/lib/
sys.path.insert(0, path.pardir)
else:
# always test the sphinx package from this directory
sys.path.insert(0, path.join(path.dirname(__file__), path.pardir))
try:
import nose