Skip to content

Commit

Permalink
Trying to clean test crumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science committed May 14, 2024
1 parent 55dcf69 commit 42d67ec
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions armi/bookkeeping/db/tests/test_databaseInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ def setUp(self):

def tearDown(self):
self.td.__exit__(None, None, None)
# sometimes this crumb is being left, let's delete it
crumb = os.path.join(PROJECT_ROOT, "armiRun.h5")
if os.path.exists(crumb):
os.remove(crumb)

def test_writeSystemAttributes(self):
"""Test the writeSystemAttributes method.
Expand Down Expand Up @@ -332,6 +336,10 @@ def tearDownClass(cls):
cls.td.__exit__(None, None, None)
del cls.r
cls.r = None
# sometimes this crumb is being left, let's delete it
crumb = os.path.join(PROJECT_ROOT, "armiRun.h5")
if os.path.exists(crumb):
os.remove(crumb)

def _fullCoreSizeChecker(self, r):
self.assertEqual(r.core.numRings, 3)
Expand Down Expand Up @@ -538,3 +546,8 @@ def test_standardRestart(self):
firstEndTime, o.r.p.time
),
)

# sometimes this crumb is being left, let's delete it
crumb = os.path.join(PROJECT_ROOT, "armiRun.h5")
if os.path.exists(crumb):
os.remove(crumb)

0 comments on commit 42d67ec

Please sign in to comment.