mirror of
https://github.com/beetbox/beets.git
synced 2025-12-16 05:34:47 +01:00
Fixed bug when running subset of testcases
Happens when invoking `tox -e py27 test.test_ui` directly.
`os.environ.get('HOME')` seems to return None and raises an Exception
in tearDown of class
This commit is contained in:
parent
db7fffbdcc
commit
c7fff52324
1 changed files with 2 additions and 1 deletions
|
|
@ -632,7 +632,8 @@ class ConfigTest(unittest.TestCase, TestHelper):
|
|||
def tearDown(self):
|
||||
commands.default_commands.pop()
|
||||
os.chdir(self._orig_cwd)
|
||||
os.environ['HOME'] = self._old_home
|
||||
if self._old_home is not None:
|
||||
os.environ['HOME'] = self._old_home
|
||||
self.teardown_beets()
|
||||
|
||||
def _make_test_cmd(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue