From 1b338b3f6ca78b9c8c2bbdf03bbc906e9bc32c32 Mon Sep 17 00:00:00 2001 From: Justus Kuhlmann Date: Tue, 21 Apr 2026 16:15:41 +0200 Subject: [PATCH] add FileNotFound to db tests --- tests/tools_test.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/tools_test.py b/tests/tools_test.py index 541674f..917e1a1 100644 --- a/tests/tools_test.py +++ b/tests/tools_test.py @@ -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") -- 2.43.0