From b31ad388b1366519fafea865c7fa425a81887ff3 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Tue, 19 Aug 2014 12:52:48 -0700 Subject: [PATCH] Clean up properly after DistanceTest One more ordering dependency. That's all of them, right??? --- test/_common.py | 3 +++ test/test_autotag.py | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/test/_common.py b/test/_common.py index d209bf4ef..4b493883a 100644 --- a/test/_common.py +++ b/test/_common.py @@ -128,6 +128,9 @@ class TestCase(unittest.TestCase): os.environ['HOME'] = self._old_home self.io.restore() + beets.config.clear() + beets.config._materialized = False + def assertExists(self, path): self.assertTrue(os.path.exists(path), 'file does not exist: %s' % path) diff --git a/test/test_autotag.py b/test/test_autotag.py index 8a7e4dfa7..10a03bd2f 100644 --- a/test/test_autotag.py +++ b/test/test_autotag.py @@ -116,6 +116,10 @@ def _clear_weights(): class DistanceTest(_common.TestCase): + def tearDown(self): + super(DistanceTest, self).tearDown() + _clear_weights() + def test_add(self): dist = Distance() dist.add('add', 1.0)