Skip to content

Commit

Permalink
Adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyBF committed Jan 25, 2025
1 parent 9eafdbf commit 2f44cef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions ext/pytests/test_secondary_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@


def folder_pairs(folder):
filename_parts = (f.stem.split("_") for f in folder.glob("*"))
return (
(int(split[0]), int(split[1]))
for split in (f.stem.split("_") for f in folder.glob("*"))
(int(split[0].replace("m", "-")), int(split[1])) for split in filename_parts
)


Expand Down Expand Up @@ -34,11 +34,11 @@ def test_secondary_job(tmp_path, monkeypatch):
"secondary_composites",
"secondary_intermediates",
]:
for s, t in folder_pairs(tmp_path / folder):
assert t - s <= max_stems
for n, _ in folder_pairs(tmp_path / folder):
assert n <= max_stems

for s, _ in folder_pairs(tmp_path / "secondary_composites"):
for _, s in folder_pairs(tmp_path / "secondary_composites"):
assert s == goal_stem

for s, _ in folder_pairs(tmp_path / "secondary_intermediates"):
for _, s in folder_pairs(tmp_path / "secondary_intermediates"):
assert s == goal_stem + 1
2 changes: 1 addition & 1 deletion ext/tests/save_load_resolution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ fn test_checksum() {
.compute_through_bidegree(Bidegree::s_t(2, 2));

let mut path = tempdir.path().to_owned();
path.push("differentials/2_2_differential");
path.push("differentials/0_2_differential");

let mut file = OpenOptions::new()
.read(true)
Expand Down

0 comments on commit 2f44cef

Please sign in to comment.