From 3adf67cd6aeb2f4f14a5e274c258759efbc63ba5 Mon Sep 17 00:00:00 2001 From: wiemann Date: Thu, 15 Dec 2005 20:54:48 +0000 Subject: added absolute path of test root to sys.path because Py21/Py22 insert the *relative* path "test" at the beginning of sys.path when running "python2.2 test/alltests.py", which breaks the imports due to chdir; replaced os.path.sep with os.sep for Py21/Py22 compatibility git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@4220 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/test/DocutilsTestSupport.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docutils/test/DocutilsTestSupport.py') diff --git a/docutils/test/DocutilsTestSupport.py b/docutils/test/DocutilsTestSupport.py index 758b86454..c3c0aa2a2 100644 --- a/docutils/test/DocutilsTestSupport.py +++ b/docutils/test/DocutilsTestSupport.py @@ -46,7 +46,8 @@ import os testroot = os.path.abspath(os.path.dirname(__file__) or os.curdir) os.chdir(testroot) -sys.path.insert(1, os.path.normpath(os.path.join(testroot, '..'))) +sys.path.insert(0, os.path.normpath(os.path.join(testroot, '..'))) +sys.path.insert(0, testroot) sys.path.append(os.path.normpath(os.path.join(testroot, '..', 'extras'))) import unittest -- cgit v1.2.1