Skip to content

Commit

Permalink
tests: fix ChangingDirectoryTests: cd back in tearDown
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed committed Aug 20, 2018
1 parent d843ca8 commit 53d605f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_runscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,13 @@ def test_prints_nothing_for_script_without_run(self):
class ChangingDirectoryTests(RunScriptTests):
def setUp(self):
super(ChangingDirectoryTests, self).setUp()
self.curwd = os.getcwd()
os.chdir(project_path)

def tearDown(self):
super(ChangingDirectoryTests, self).setUp()
os.chdir(self.curwd)

def _execute_script_with_chdir(self, dir_policy, start_path, expected_path, chdir=None):
os.chdir(os.path.join(project_path, *start_path))
expected_path = os.path.join(project_path, *expected_path)
Expand Down

0 comments on commit 53d605f

Please sign in to comment.