diff --git a/tests/cram.py b/tests/cram.py index e19aaf22..2a55f1c2 100644 --- a/tests/cram.py +++ b/tests/cram.py @@ -7,7 +7,7 @@ topdir = testsdir.parent @pytest.mark.skipif(os.name != "posix", reason = "cram requires a POSIX platform") -@pytest.mark.parametrize("testfile", testsdir.glob("*.cram"), ids = str) +@pytest.mark.parametrize("testfile", list(testsdir.glob("*.cram")), ids = str) def pytest_cram(testfile): # Check the exit status ourselves for nicer test output on failure result = run(["cram", testfile], cwd = topdir) diff --git a/tests/markdown.py b/tests/markdown.py index cb6659e4..98e35a3f 100644 --- a/tests/markdown.py +++ b/tests/markdown.py @@ -8,10 +8,12 @@ datadir = testsdir / "data/markdown/" def cases(pattern): - for case in datadir.glob(pattern): - yield pytest.param( + return [ + pytest.param( case, id = str(case.relative_to(topdir))) + for case in datadir.glob(pattern) + ] @pytest.mark.parametrize("case", cases("roundtrip-*.md"))