Skip to content

Commit

Permalink
be careful with chdir
Browse files Browse the repository at this point in the history
  • Loading branch information
neph1 committed Jan 3, 2024
1 parent fed1a3e commit e6fddab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_json_story.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@ def test_save_story(self):
self.story.save()

def test_save_story_as(self):
old_dir = os.getcwd()
os.chdir(os.getcwd() + '/stories/test_story/')
self.story.save('test_story2')
assert os.path.exists('../test_story2')
shutil.rmtree('../test_story2', ignore_errors=True)
assert not os.path.exists('../test_story2')
os.chdir(old_dir)

class TestAnythingStory():

Expand Down

0 comments on commit e6fddab

Please sign in to comment.