diff options
author | noah <noah@656d521f-e311-0410-88e0-e7920216d269> | 2003-05-08 01:37:44 +0000 |
---|---|---|
committer | noah <noah@656d521f-e311-0410-88e0-e7920216d269> | 2003-05-08 01:37:44 +0000 |
commit | 3677e721fb208749f5de4e87fb294e28442852e6 (patch) | |
tree | 518a5b6f2873746d01ac4eb7dba698cc4431c530 | |
parent | 114a12ff12f526c1c8cb748939ccb197e532c5ea (diff) | |
download | pexpect-3677e721fb208749f5de4e87fb294e28442852e6.tar.gz |
This is the baseclass for tests. It includes a setUp and tearDown
that configures the environment for testing Pexpect.
git-svn-id: http://pexpect.svn.sourceforge.net/svnroot/pexpect/trunk@195 656d521f-e311-0410-88e0-e7920216d269
-rw-r--r-- | pexpect/tests/PexpectTestCase.py | 13 | ||||
-rwxr-xr-x | pexpect/tests/test_winsize.py | 3 |
2 files changed, 15 insertions, 1 deletions
diff --git a/pexpect/tests/PexpectTestCase.py b/pexpect/tests/PexpectTestCase.py new file mode 100644 index 0000000..87ea931 --- /dev/null +++ b/pexpect/tests/PexpectTestCase.py @@ -0,0 +1,13 @@ + +import unittest +import sys +import os + +class PexpectTestCase(unittest.TestCase): + def setUp(self): + self.original_path = os.getcwd() + newpath = os.path.join (os.environ['PROJECT_PEXPECT_HOME'], 'tests') + os.chdir (newpath) + def tearDown(self): + os.chdir (self.original_path) + diff --git a/pexpect/tests/test_winsize.py b/pexpect/tests/test_winsize.py index 672818b..ebc9505 100755 --- a/pexpect/tests/test_winsize.py +++ b/pexpect/tests/test_winsize.py @@ -1,9 +1,10 @@ #!/usr/bin/env python import pexpect import unittest +import PexpectTestCase import time -class TestCaseWinsize(unittest.TestCase): +class TestCaseWinsize(PexpectTestCase.PexpectTestCase): def test_winsize (self): """ This tests that the child process can set and get the windows size. |