diff test/testzcc.py @ 321:8c569fbe60e4

Load yacc and burg dynamic
author Windel Bouwman
date Sun, 19 Jan 2014 18:48:45 +0100
parents 084cccaa5deb
children 44f336460c2a
line wrap: on
line diff
--- a/test/testzcc.py	Sun Jan 19 16:09:44 2014 +0100
+++ b/test/testzcc.py	Sun Jan 19 18:48:45 2014 +0100
@@ -9,10 +9,17 @@
 import target
 
 
+# Store testdir for safe switch back to directory:
+testdir = os.path.dirname(os.path.abspath(__file__))
+
+
 class ZccTestCase(unittest.TestCase):
     """ Tests the compiler driver """
     def setUp(self):
-        os.chdir(os.path.dirname(os.path.abspath(__file__)))
+        os.chdir(testdir)
+
+    def tearDown(self):
+        os.chdir(testdir)
 
     def do(self, filenames, imps=[]):
         basedir = os.path.join('..', 'examples', 'c3')