diff options
author | David Luevano Alvarado <david@luevano.xyz> | 2023-04-25 04:03:48 -0600 |
---|---|---|
committer | David Luevano Alvarado <david@luevano.xyz> | 2023-04-25 04:03:48 -0600 |
commit | 1b2d6aff6ccf72fdb292a1f05bb41bf9633a8f55 (patch) | |
tree | 435d5752fc5c50a3453e550c7f95f85b70d8ad2a /tests/test_database.py | |
parent | 42a135329e69360745294e7bcdd4261318aeafc0 (diff) |
refactor tests and add more typing
Diffstat (limited to 'tests/test_database.py')
-rw-r--r-- | tests/test_database.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/test_database.py b/tests/test_database.py index 7ca597f..c5957e4 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -6,8 +6,9 @@ from pyssg.database import Database from pyssg.database_entry import DatabaseEntry -def test_read_database_no_db(test_dir: str, caplog: LogCaptureFixture) -> None: - path: str = f'{test_dir}/non_existent_db.psv' +def test_read_database_no_db(sample_files_path: str, + caplog: LogCaptureFixture) -> None: + path: str = f'{sample_files_path}/non_existent_db.psv' war: tuple[str, int, str] = ('pyssg.database', WARNING, f'"{path}" doesn\'t exist, will be created ' @@ -18,9 +19,9 @@ def test_read_database_no_db(test_dir: str, caplog: LogCaptureFixture) -> None: assert caplog.record_tuples[-1] == war -def test_read_database_not_a_file(test_dir: str, +def test_read_database_not_a_file(sample_files_path: str, caplog: LogCaptureFixture) -> None: - path: str = test_dir + path: str = sample_files_path err: tuple[str, int, str] = ('pyssg.database', ERROR, f'"{path}" is not a file') |