tests: made all tests pass on cygwin. Fixes #655

This commit is contained in:
Yevgeny Bezman 2014-04-17 19:49:28 +03:00
parent 9d6c6f76bb
commit bbb1f7a295
2 changed files with 3 additions and 2 deletions

View file

@ -152,9 +152,8 @@ class TestHelper(object):
self.lib = Library(dbpath, self.libdir)
def teardown_beets(self):
self.lib._connection().close()
del self.lib._connections
del os.environ['BEETSDIR']
# FIXME somehow close all open fd to the ilbrary
self.remove_temp_dir()
self.config.clear()
beets.config.read(user=False, defaults=True)

View file

@ -544,6 +544,8 @@ class ConfigTest(_common.TestCase):
del os.environ['BEETSDIR']
if os.getcwd != self._orig_cwd:
os.chdir(self._orig_cwd)
if hasattr(self.test_cmd, 'lib'):
self.test_cmd.lib._connection().close()
super(ConfigTest, self).tearDown()
def _make_test_cmd(self):