# HG changeset patch # User domruf # Date 2017-08-06 20:18:37 # Node ID 0866bb29f2177410fc74c5aff306e237af0b0e07 # Parent 0add693c626bade1f86a587d83375c84b69df881 tests: don't silence errors while creating test index "Errors should never pass silently." For example, I had the problem, that a previous test did not clean up the lock file for the index_dir, which then caused the future tests to fail. Because the error has been silenced, it took a while until I found the reason. diff --git a/kallithea/tests/fixture.py b/kallithea/tests/fixture.py --- a/kallithea/tests/fixture.py +++ b/kallithea/tests/fixture.py @@ -411,11 +411,8 @@ def create_test_index(repo_location, con if not os.path.exists(index_location): os.makedirs(index_location) - try: - l = DaemonLock(file_=os.path.join(dirname(index_location), 'make_index.lock')) - WhooshIndexingDaemon(index_location=index_location, - repo_location=repo_location) \ - .run(full_index=full_index) - l.release() - except LockHeld: - pass + l = DaemonLock(file_=os.path.join(dirname(index_location), 'make_index.lock')) + WhooshIndexingDaemon(index_location=index_location, + repo_location=repo_location) \ + .run(full_index=full_index) + l.release()