diff --git a/tests/test_site_r2_emulators.py b/tests/test_site_r2_emulators.py index 6cf729eed..47aeed53b 100644 --- a/tests/test_site_r2_emulators.py +++ b/tests/test_site_r2_emulators.py @@ -165,6 +165,9 @@ class TheSummaryLineIsProse(unittest.TestCase): class TheIndexNamesEmulatorsAndSystems(unittest.TestCase): def test_columns_and_counts(self): + # Pages another test split off would send the console elsewhere. + siterender.reset_console_pages() + self.addCleanup(siterender.reset_console_pages) saved = dict(siterender._system_page_map) self.addCleanup(siterender.set_system_page_map, saved) siterender.set_system_page_map({"sony-playstation": ("sony", "PlayStation")}) diff --git a/tests/test_site_r2_systems.py b/tests/test_site_r2_systems.py index 1b985c79d..c24ec2212 100644 --- a/tests/test_site_r2_systems.py +++ b/tests/test_site_r2_systems.py @@ -128,7 +128,7 @@ class TheConsoleBiosComesFirst(unittest.TestCase): self.assertEqual(gs._start_with([_file("a.bin", "a")], _consumers({})), []) def test_the_page_carries_the_line_under_the_console(self): - # Sega keeps its consoles as sections; Sony gives each a page. + # Sega keeps its consoles as sections. Sony gives each a page. page = gs.generate_system_page("Sega", {"Saturn": self.files}, self.required_only()) heading = page.index("## Saturn") self.assertLess(heading, page.index("**Start with**")) @@ -254,6 +254,8 @@ class TheSystemsIndexListsConsoles(unittest.TestCase): be known to be under Sony.""" def test_one_row_per_console_by_its_name(self): + gs.reset_console_pages() + self.addCleanup(gs.reset_console_pages) groups = { "Sony": {"PlayStation": [_file("a.bin", "a")], "PlayStation 2": [_file("b.bin", "b")]}, "Other": {"ScummVM": [_file("c.bin", "c")]}, diff --git a/tests/test_site_r4_systems.py b/tests/test_site_r4_systems.py index 502815e68..962ff4565 100644 --- a/tests/test_site_r4_systems.py +++ b/tests/test_site_r4_systems.py @@ -288,12 +288,13 @@ class ConsolesFieldNamesMachinesOnce(unittest.TestCase): consumers = _consumers({}) with gs.markup.using("mkdocs"): one = sum(len(line) + 1 for line in gs._system_file_card(big[0], consumers)) - # Sega splits by size; every Sony console has a page whatever its size. + # Sega splits by size. Every Sony console has a page whatever its size. pages = gs.system_pages("Sega", {"Saturn": big, "Pico": small}, consumers, budget=one * 12) self.assertIn("sega-saturn", pages) self.assertEqual(_consoles(pages["sega"][0]), ["Pico"]) self.assertEqual(_consoles(pages["sega-saturn"][0]), ["Saturn"]) + self.addCleanup(gs.reset_console_pages) sony = gs.system_pages("Sony", {"PlayStation": big, "PocketStation": small}, consumers, budget=one * 12) self.assertEqual(_consoles(sony["sony"][0]), [])