summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kluyver <takowl@gmail.com>2014-06-01 17:35:23 -0700
committerThomas Kluyver <takowl@gmail.com>2014-06-01 20:38:01 -0700
commit4be9a878b994b77d210840e72353f2c5c3e07536 (patch)
tree6ad3be2211869b0e99af5fd1d9c51c31bc757df4
parentce564840d79b6c7d337721fd98f9df4b857789a5 (diff)
downloadpexpect-4be9a878b994b77d210840e72353f2c5c3e07536.tar.gz
Don't rely on environment variable set in test.env
-rw-r--r--tests/PexpectTestCase.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/PexpectTestCase.py b/tests/PexpectTestCase.py
index 619d094..aa80aec 100644
--- a/tests/PexpectTestCase.py
+++ b/tests/PexpectTestCase.py
@@ -28,9 +28,9 @@ class PexpectTestCase(unittest.TestCase):
def setUp(self):
self.PYTHONBIN = sys.executable
self.original_path = os.getcwd()
- project_dir = os.environ['PROJECT_PEXPECT_HOME']
- newpath = os.path.join (project_dir, 'tests')
- os.chdir (newpath)
+ tests_dir = os.path.dirname(__file__)
+ project_dir = os.path.dirname(tests_dir)
+ os.chdir(tests_dir)
os.environ['COVERAGE_PROCESS_START'] = os.path.join(project_dir, '.coveragerc')
os.environ['COVERAGE_FILE'] = os.path.join(project_dir, '.coverage')
print('\n', self.id(), end=' ')