From bbb1f7a295d3bce5af79832b01d46bb631fa062e Mon Sep 17 00:00:00 2001 From: Yevgeny Bezman Date: Thu, 17 Apr 2014 19:49:28 +0300 Subject: [PATCH] tests: made all tests pass on cygwin. Fixes #655 --- test/helper.py | 3 +-- test/test_ui.py | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/helper.py b/test/helper.py index 0feaf2f81..eee1e1f0c 100644 --- a/test/helper.py +++ b/test/helper.py @@ -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) diff --git a/test/test_ui.py b/test/test_ui.py index e9e79f9ab..17bf64fd5 100644 --- a/test/test_ui.py +++ b/test/test_ui.py @@ -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):