mirror of
https://github.com/beetbox/beets.git
synced 2026-01-30 12:02:41 +01:00
Tidy up plugins in ui config tests
Some of these tests load plugins using beets' normal plugin loader, but didn't call unload_plugins to tidy up afterwards. This led to any future plugin loads being ignored until the next unload_plugins call. This commit changes the config tests so that we always call load_plugins on setup (to store the default beets state) and unload_plugins on teardown (to restore the previously stored state).
This commit is contained in:
parent
75223eedb7
commit
0ed2fbc7b0
1 changed files with 2 additions and 0 deletions
|
|
@ -770,6 +770,7 @@ class ConfigTest(unittest.TestCase, TestHelper, _common.Assertions):
|
|||
os.makedirs(self.beetsdir)
|
||||
|
||||
self._reset_config()
|
||||
self.load_plugins()
|
||||
|
||||
def tearDown(self):
|
||||
commands.default_commands.pop()
|
||||
|
|
@ -780,6 +781,7 @@ class ConfigTest(unittest.TestCase, TestHelper, _common.Assertions):
|
|||
del os.environ['APPDATA']
|
||||
else:
|
||||
os.environ['APPDATA'] = self._old_appdata
|
||||
self.unload_plugins()
|
||||
self.teardown_beets()
|
||||
|
||||
def _make_test_cmd(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue