Skip to content

Commit 3165a13

Browse files
committed
Add test for parsing database_url from config
1 parent ae23a02 commit 3165a13

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

tests/test_database.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,17 @@ def test_rename_database_w_config(tmp_path, runner):
6868
assert path_to_db.exists()
6969

7070

71+
def test_database_url_from_config_is_parsed(tmp_path):
72+
tmp_path.joinpath("pyproject.toml").write_text(
73+
"[tool.pytask.ini_options]\ndatabase_url='sqlite:///.db.sqlite'"
74+
)
75+
76+
session = build(paths=tmp_path)
77+
78+
assert session.exit_code == ExitCode.OK
79+
assert session.config["database_url"].drivername == "sqlite"
80+
81+
7182
def test_rename_database_w_cli(tmp_path, runner):
7283
"""Modification dates of input and output files are stored in database."""
7384
path_to_db = tmp_path.joinpath(".db.sqlite")

0 commit comments

Comments
 (0)