Skip to content

Commit

Permalink
Add regression test for files created when downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
dstansby committed Dec 28, 2024
1 parent 6ac9989 commit 9ac61ea
Showing 1 changed file with 211 additions and 0 deletions.
211 changes: 211 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,217 @@ def test_astronaut_download(self, tmpdir):
main(["download", filename, f"--output={out}"])
main(["info", f"{out}/{basename}"])

out_path = Path(out) / "data-3"
paths = [p.relative_to(out_path) for p in out_path.glob("*")]
assert sorted(paths) == [
Path(".zattrs"),
Path(".zgroup"),
Path("0"),
Path("1"),
Path("2"),
Path("3"),
Path("4"),
Path("labels"),
]

data_path = Path(out) / "data-3" / "1"
paths = [p.relative_to(data_path) for p in data_path.glob("*")]
assert sorted(paths) == [
Path(".zarray"),
Path("0.0.0"),
Path("0.0.1"),
Path("0.0.2"),
Path("0.0.3"),
Path("0.0.4"),
Path("0.0.5"),
Path("0.0.6"),
Path("0.0.7"),
Path("0.1.0"),
Path("0.1.1"),
Path("0.1.2"),
Path("0.1.3"),
Path("0.1.4"),
Path("0.1.5"),
Path("0.1.6"),
Path("0.1.7"),
Path("0.2.0"),
Path("0.2.1"),
Path("0.2.2"),
Path("0.2.3"),
Path("0.2.4"),
Path("0.2.5"),
Path("0.2.6"),
Path("0.2.7"),
Path("0.3.0"),
Path("0.3.1"),
Path("0.3.2"),
Path("0.3.3"),
Path("0.3.4"),
Path("0.3.5"),
Path("0.3.6"),
Path("0.3.7"),
Path("0.4.0"),
Path("0.4.1"),
Path("0.4.2"),
Path("0.4.3"),
Path("0.4.4"),
Path("0.4.5"),
Path("0.4.6"),
Path("0.4.7"),
Path("0.5.0"),
Path("0.5.1"),
Path("0.5.2"),
Path("0.5.3"),
Path("0.5.4"),
Path("0.5.5"),
Path("0.5.6"),
Path("0.5.7"),
Path("0.6.0"),
Path("0.6.1"),
Path("0.6.2"),
Path("0.6.3"),
Path("0.6.4"),
Path("0.6.5"),
Path("0.6.6"),
Path("0.6.7"),
Path("0.7.0"),
Path("0.7.1"),
Path("0.7.2"),
Path("0.7.3"),
Path("0.7.4"),
Path("0.7.5"),
Path("0.7.6"),
Path("0.7.7"),
Path("1.0.0"),
Path("1.0.1"),
Path("1.0.2"),
Path("1.0.3"),
Path("1.0.4"),
Path("1.0.5"),
Path("1.0.6"),
Path("1.0.7"),
Path("1.1.0"),
Path("1.1.1"),
Path("1.1.2"),
Path("1.1.3"),
Path("1.1.4"),
Path("1.1.5"),
Path("1.1.6"),
Path("1.1.7"),
Path("1.2.0"),
Path("1.2.1"),
Path("1.2.2"),
Path("1.2.3"),
Path("1.2.4"),
Path("1.2.5"),
Path("1.2.6"),
Path("1.2.7"),
Path("1.3.0"),
Path("1.3.1"),
Path("1.3.2"),
Path("1.3.3"),
Path("1.3.4"),
Path("1.3.5"),
Path("1.3.6"),
Path("1.3.7"),
Path("1.4.0"),
Path("1.4.1"),
Path("1.4.2"),
Path("1.4.3"),
Path("1.4.4"),
Path("1.4.5"),
Path("1.4.6"),
Path("1.4.7"),
Path("1.5.0"),
Path("1.5.1"),
Path("1.5.2"),
Path("1.5.3"),
Path("1.5.4"),
Path("1.5.5"),
Path("1.5.6"),
Path("1.5.7"),
Path("1.6.0"),
Path("1.6.1"),
Path("1.6.2"),
Path("1.6.3"),
Path("1.6.4"),
Path("1.6.5"),
Path("1.6.6"),
Path("1.6.7"),
Path("1.7.0"),
Path("1.7.1"),
Path("1.7.2"),
Path("1.7.3"),
Path("1.7.4"),
Path("1.7.5"),
Path("1.7.6"),
Path("1.7.7"),
Path("2.0.0"),
Path("2.0.1"),
Path("2.0.2"),
Path("2.0.3"),
Path("2.0.4"),
Path("2.0.5"),
Path("2.0.6"),
Path("2.0.7"),
Path("2.1.0"),
Path("2.1.1"),
Path("2.1.2"),
Path("2.1.3"),
Path("2.1.4"),
Path("2.1.5"),
Path("2.1.6"),
Path("2.1.7"),
Path("2.2.0"),
Path("2.2.1"),
Path("2.2.2"),
Path("2.2.3"),
Path("2.2.4"),
Path("2.2.5"),
Path("2.2.6"),
Path("2.2.7"),
Path("2.3.0"),
Path("2.3.1"),
Path("2.3.2"),
Path("2.3.3"),
Path("2.3.4"),
Path("2.3.5"),
Path("2.3.6"),
Path("2.3.7"),
Path("2.4.0"),
Path("2.4.1"),
Path("2.4.2"),
Path("2.4.3"),
Path("2.4.4"),
Path("2.4.5"),
Path("2.4.6"),
Path("2.4.7"),
Path("2.5.0"),
Path("2.5.1"),
Path("2.5.2"),
Path("2.5.3"),
Path("2.5.4"),
Path("2.5.5"),
Path("2.5.6"),
Path("2.5.7"),
Path("2.6.0"),
Path("2.6.1"),
Path("2.6.2"),
Path("2.6.3"),
Path("2.6.4"),
Path("2.6.5"),
Path("2.6.6"),
Path("2.6.7"),
Path("2.7.0"),
Path("2.7.1"),
Path("2.7.2"),
Path("2.7.3"),
Path("2.7.4"),
Path("2.7.5"),
Path("2.7.6"),
Path("2.7.7"),
]

def test_s3_info(self, s3_address):
main(["info", s3_address])

Expand Down

0 comments on commit 9ac61ea

Please sign in to comment.