Skip to content

Commit

Permalink
TST: add a brief test for populated_dataset fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
adswa committed Sep 13, 2023
1 parent bd9bcf3 commit 1ba99bb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions datalad_ria/tests/test_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,13 @@ def test_riaserver_fixture(ria_sshserver):
# base url and local path
assert len(ria_sshserver) == 2
assert ria_sshserver[0].startswith('ria+ssh://')


def test_populate_dataset_fixture(populated_dataset):
# populated_dataset is a Dataset object
assert populated_dataset.pathobj.exists()
assert (populated_dataset.pathobj / 'three.txt').exists()
with open(populated_dataset.pathobj / 'three.txt') as file:
payload = file.read()
assert payload == "content3"
assert (populated_dataset.pathobj / 'subdir').is_dir()

0 comments on commit 1ba99bb

Please sign in to comment.