Skip to content

Commit

Permalink
Fix locating the dump file
Browse files Browse the repository at this point in the history
  • Loading branch information
rseichter committed Apr 17, 2022
1 parent 6e26694 commit 34ea50a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ def test_loglevel_good(self):
self.assertEqual(logging.FATAL, log_level())

def test_dump(self):
conf = Config()
conf.init()
c = Config()
c.init()
f = NamedTemporaryFile(mode='wt', delete=False)
conf.dump(f)
c.dump(f)
f.close()
x = filecmp.cmp('dump-expected', f.name, shallow=False)
p = os.path.join(os.path.dirname(__file__), 'dump-expected')
x = filecmp.cmp(p, f.name, shallow=False)
os.unlink(f.name)
self.assertTrue(x, msg='Dumped content differs')

Expand Down

0 comments on commit 34ea50a

Please sign in to comment.