Handle the new pytest subTest integration

This commit is contained in:
Trenton Holmes
2026-01-24 19:45:30 -08:00
parent c5fb80dc35
commit 55d06fda03

View File

@@ -224,17 +224,18 @@ class TestDoubleSided(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
THEN: THEN:
- The collated file gets put into foo/bar - The collated file gets put into foo/bar
""" """
# TODO: parameterize this instead
for path in [ for path in [
Path("foo") / "bar" / "double-sided", Path("foo") / "bar" / "double-sided",
Path("double-sided") / "foo" / "bar", Path("double-sided") / "foo" / "bar",
]: ]:
with self.subTest(path=path): with self.subTest(path=str(path)):
# Ensure we get fresh directories for each run # Ensure we get fresh directories for each run
self.tearDown() self.tearDown()
self.setUp() self.setUp()
self.create_staging_file() self.create_staging_file()
self.consume_file("double-sided-odd.pdf", path / "foo.pdf") self.consume_file("double-sided-odd.pdf", Path(path) / "foo.pdf")
self.assertIsFile( self.assertIsFile(
self.dirs.consumption_dir / "foo" / "bar" / "foo-collated.pdf", self.dirs.consumption_dir / "foo" / "bar" / "foo-collated.pdf",
) )