diff options
Diffstat (limited to 'tests/test_PackageDB.py')
-rw-r--r-- | tests/test_PackageDB.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/test_PackageDB.py b/tests/test_PackageDB.py index 152c605..8be8f8a 100644 --- a/tests/test_PackageDB.py +++ b/tests/test_PackageDB.py @@ -70,11 +70,13 @@ class TestPackageDB(BaseTest): srv = Server(orig_tempdir.name, port=port) srv.start() - self.assertRaises(IntegrityError, test_db.sync, sync_address) - os.system("cd " + orig_tempdir.name + " && mv good.tar.gz dummy.tar.gz") - test_db.sync(sync_address) - srv.shutdown() - srv.join() + try: + self.assertRaises(IntegrityError, test_db.sync, sync_address) + os.system("cd " + orig_tempdir.name + " && mv good.tar.gz dummy.tar.gz") + test_db.sync(sync_address) + finally: + srv.shutdown() + srv.join() test_db.read() self.assertEqual(orig_db.database, test_db.database) self.assertEqual(orig_db.get_common_data("app-test1"), test_db.get_common_data("app-test1")) |