Commit 258e97bb authored by Robert Bradshaw's avatar Robert Bradshaw

Restore cwd if debugger setUp() fails (to avoid breaking later tests).

parent 40514012
......@@ -90,6 +90,7 @@ class DebuggerTestCase(unittest.TestCase):
self.cfuncs_destfile = os.path.join(self.tempdir, 'cfuncs')
self.cwd = os.getcwd()
try:
os.chdir(self.tempdir)
shutil.copy(codefile, self.destfile)
......@@ -145,6 +146,10 @@ class DebuggerTestCase(unittest.TestCase):
# cmdclass=dict(build_ext=Cython.Distutils.build_ext)
# )
except:
os.chdir(self.cwd)
raise
def tearDown(self):
if not test_gdb():
return
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment