add FileNotFound to db tests #36
1 changed files with 4 additions and 0 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue