Skip to content

Commit

Permalink
🧪 Test more config
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwoerpel committed Oct 21, 2024
1 parent 5046c66 commit c361bf1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from leakrfc.archive import Archive, configure_archive, get_archive, get_dataset


def test_config(fixtures_path, monkeypatch):
def test_config(fixtures_path, monkeypatch, tmp_path):
config = Archive._from_uri(fixtures_path / "archive.yml")
archive = get_archive()
assert config.storage.uri.strip(".") in archive._storage.uri
Expand All @@ -30,7 +30,12 @@ def test_config(fixtures_path, monkeypatch):
dataset = get_dataset("test_dataset", uri="foo")
assert dataset._storage.uri.endswith("foo")

archive = get_archive("foo.leakrfc")
archive = get_archive(tmp_path / "foo.leakrfc")
assert archive.is_zip
dataset = archive.get_dataset("test")
assert dataset._storage.uri == archive._storage.uri
assert dataset._make_path() == "test"

dataset = get_dataset("test_dataset", tmp_path / "foo2.leakrfc")
assert dataset.is_zip
assert dataset._make_path() == "test_dataset"

0 comments on commit c361bf1

Please sign in to comment.