diff --git a/test/test.py b/test/test.py index ccd64d1..1b756c0 100755 --- a/test/test.py +++ b/test/test.py @@ -1866,6 +1866,7 @@ def copytree(src, dst, ignore=None): # copy the testdata into a temp dir in order to avoid .svn dirs breaking some tests tmpdatapath = tempfile.mkdtemp() +orig_path = os.getcwd() try: copytree(cfvtest.datapath, tmpdatapath, ignore=['.svn']) os.chdir(tmpdatapath) # do this after the setcfv, since the user may have specified a relative path @@ -1881,4 +1882,5 @@ def copytree(src, dst, ignore=None): failed += all_tests() sys.exit(failed) finally: + os.chdir(orig_path) shutil.rmtree(tmpdatapath)