Skip to content

Commit

Permalink
Move assertions out request error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed May 29, 2024
1 parent 5d2ccdf commit ce1582f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/unit/app/managers/test_CitationsManager_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def test_DoiCache(url_factory): # noqa: F811
try:
assert "Jörg" in doi_cache.get_bibtex("10.1093/bioinformatics/bts252")
assert "Özkurt" in doi_cache.get_bibtex("10.1101/2021.12.24.474111")
assert not is_cache_empty(db_url, "doi")
doi_cache._cache.clear()
assert is_cache_empty(db_url, "doi")
except requests.exceptions.RequestException as e:
raise SkipTest(f"dx.doi failed to respond: {e}")
assert not is_cache_empty(db_url, "doi")
doi_cache._cache.clear()
assert is_cache_empty(db_url, "doi")

0 comments on commit ce1582f

Please sign in to comment.