add FileNotFound to db tests
Some checks failed
Mypy / mypy (push) Successful in 1m12s
Pytest / pytest (3.12) (push) Successful in 1m22s
Pytest / pytest (3.13) (push) Successful in 1m14s
Pytest / pytest (3.14) (push) Failing after 1m16s
Ruff / ruff (push) Successful in 1m4s
Pytest / pytest (3.12) (pull_request) Successful in 1m21s
Pytest / pytest (3.13) (pull_request) Successful in 1m13s
Pytest / pytest (3.14) (pull_request) Failing after 1m16s
Ruff / ruff (pull_request) Successful in 1m4s
Mypy / mypy (pull_request) Successful in 1m12s

This commit is contained in:
Justus Kuhlmann 2026-04-21 16:15:41 +02:00
commit 1b338b3f6c
Signed by: jkuhl
GPG key ID: 00ED992DD79B85A6

View file

@ -69,6 +69,8 @@ def test_get_db_file(tmp_path: Path) -> None:
# config is not yet available
tl.set_config(tmp_path, section, option, value)
assert tl.get_db_file(tmp_path) == Path("test_value")
with pytest.raises(FileNotFoundError):
tl.get_db_file(tmp_path / "doesnotexist")
def test_cache_enabled(tmp_path: Path) -> None:
@ -82,3 +84,5 @@ def test_cache_enabled(tmp_path: Path) -> None:
tl.set_config(tmp_path, section, option, "lalala")
with pytest.raises(ValueError):
tl.cache_enabled(tmp_path)
with pytest.raises(FileNotFoundError):
tl.cache_enabled(tmp_path / "doesnotexist")