DRY up some code
This commit is contained in:
parent
77eec9cc84
commit
eac37d8843
5 changed files with 52 additions and 88 deletions
|
|
@ -1,6 +1,5 @@
|
|||
from pathlib import Path
|
||||
from bouquin.settings import (
|
||||
default_db_path,
|
||||
get_settings,
|
||||
load_db_config,
|
||||
save_db_config,
|
||||
|
|
@ -8,12 +7,6 @@ from bouquin.settings import (
|
|||
from bouquin.db import DBConfig
|
||||
|
||||
|
||||
def test_default_db_path_returns_writable_path(app, tmp_path):
|
||||
p = default_db_path()
|
||||
assert isinstance(p, Path)
|
||||
p.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
|
||||
def test_load_and_save_db_config_roundtrip(app, tmp_path):
|
||||
s = get_settings()
|
||||
for k in ["db/path", "db/key", "ui/idle_minutes", "ui/theme", "ui/move_todos"]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue