Skip to content

Commit

Permalink
Clean up temporary directory in tests
Browse files Browse the repository at this point in the history
After cleaning up the other warnings and converting warnings to
errors, there was a new error raised about not properly cleaning
up a temporary directory created in tests.
  • Loading branch information
amstilp committed Feb 7, 2024
1 parent d8bf5c2 commit a727e38
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions primed/cdsa/tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ def setUp(self):
self.tmpdir = tempfile.TemporaryDirectory()
self.outdir = os.path.join(self.tmpdir.name, "test_output")

def tearDown(self):
self.tmpdir.cleanup()

def test_output(self):
out = StringIO()
call_command("cdsa_records", self.outdir, "--no-color", stdout=out)
Expand Down

0 comments on commit a727e38

Please sign in to comment.