diff --git a/tests/test_data_dir_refs.py b/tests/test_data_dir_refs.py index e885528ae..32b01ec6b 100644 --- a/tests/test_data_dir_refs.py +++ b/tests/test_data_dir_refs.py @@ -51,7 +51,9 @@ class EachSourceIsParsedOnce(unittest.TestCase): validate_schemas._validate_yaml_directory(root / "emulators", "emulator.schema.json") validate_schemas._unknown_data_dir_refs() layout = validate_schemas._repository_layout_in_profiles() - self.assertEqual(sorted(Path(n).name for n in loaded), ["_data_dirs.yml", "core.yml"]) + # _data_dirs.yml is read by model.registry.load_data_dir_registry, so + # only the profile passes through validate_schemas' own loader. + self.assertEqual(sorted(Path(n).name for n in loaded), ["core.yml"]) self.assertEqual(len(layout), 1) if __name__ == "__main__": diff --git a/tests/test_minui_platform.py b/tests/test_minui_platform.py index 967173e07..90bf0cb2d 100644 --- a/tests/test_minui_platform.py +++ b/tests/test_minui_platform.py @@ -454,10 +454,14 @@ class TheWholeTreeKeepsCoresMinUILeavesOut(unittest.TestCase): self.assertEqual(layouts, [(profile, False)]) def test_both_readers_build_the_set_the_same_way(self): + # The site reaches the merge through global_report_scope, the scope + # it shares with the gap report. for script in ("cross_reference.py", "generate_site.py"): source = script_source(script) with self.subTest(script=script): - self.assertIn("merged_standalone_set(", source) + self.assertTrue( + "merged_standalone_set(" in source or "global_report_scope(" in source + ) self.assertNotIn("set().union(*(\n standalone_set(", source) self.assertNotIn("*(standalone_set(cov", source) diff --git a/tests/test_scraper_network.py b/tests/test_scraper_network.py index bab0c40cb..b64f3e0da 100644 --- a/tests/test_scraper_network.py +++ b/tests/test_scraper_network.py @@ -272,10 +272,10 @@ class OneImplementationPerJob(unittest.TestCase): for needle in needles if needle in path.read_text(encoding="utf-8") ] - # buildbot_system asks for ETags with HEAD requests, which no shared - # helper sends. MinUI reads through a fetch its tests replace, and - # hands the answer to tree_entries. - self.assertEqual(found, ["buildbot_system.py: urlopen(", "minui_scraper.py: ?recursive=1"]) + # The ETag HEAD probe is core.upstream.remote_etag. MinUI reads + # through a fetch its tests replace, and hands the answer to + # tree_entries. + self.assertEqual(found, ["minui_scraper.py: ?recursive=1"]) def test_the_target_package_reads_through_the_platform_helpers(self): from scraper import targets diff --git a/wiki/testing-guide.md b/wiki/testing-guide.md index a1c9d4d76..9b8ef89e0 100644 --- a/wiki/testing-guide.md +++ b/wiki/testing-guide.md @@ -78,7 +78,7 @@ Every module in `tests/`, by the area it guards. | Pack probe | the cores a platform runs for a system, staging grown to a fixed point, runs mapped to pack and manifest entries, the line and its schema, the probe lock per run, that no page shows its lines. One class builds a real pack narrowed to PlayStation and lays it out both ways, from the archive and with `install.py --dest`, and skips without the collection | `test_pack_probe` | | Automation runner, disk cleanup, asset sync and bit-flip repair | fake jobs, git repositories with a bare origin and session worktrees, a committed file with one bit flipped, canned CI runs in place of `gh` | `test_autorun` | | Truth and native export | synthetic + cached originals | `test_export_counts`, `test_export_native_layer`, `test_export_report`, `test_exporters`, `test_truth_data_dir_readers`, `test_truth_diff`, `test_truth_layout` | -| Scrapers, upstream and provenance | inline sources, synthetic | `test_auto_fetch_lookup`, `test_batocera_md5_list`, `test_find_embedded`, `test_report_excerpt`, `test_check_freshness`, `test_cited_lines`, `test_contributing_text`, `test_coverage_cache`, `test_data_dir_refs`, `test_dataclass_defaults`, `test_dedup`, `test_doc_pages`, `test_doc_surfaces`, `test_elec_scrapers`, `test_fbneo_parser`, `test_find_pinned_revision`, `test_hash_merge`, `test_launchers`, `test_launchers_amberelec`, `test_launchers_emudeck`, `test_launchers_emuelec`, `test_launchers_knulli`, `test_launchers_recalbox`, `test_launchers_retrobat`, `test_launchers_retrodeck`, `test_launchers_retropie`, `test_launchers_rocknix`, `test_lines`, `test_listxml`, `test_mame_devices`, `test_mame_parser`, `test_mame_ref_audit`, `test_optional_dependencies`, `test_pin_build`, `test_profile_sync`, `test_prose_style`, `test_provenance`, `test_refresh_data_dirs`, `test_refresh_failures`, `test_refresh_stale`, `test_retired_files`, `test_retrodeck_scraper_errors`, `test_romset_recipes`, `test_schema_semantic_gate`, `test_scraper_contract`, `test_scraper_network`, `test_site_agents`, `test_site_arcade_boards`, `test_site_availability`, `test_site_bootstrap`, `test_site_built_gate`, `test_site_components`, `test_site_console_folders`, `test_site_content_data`, `test_site_copy`, `test_site_cores`, `test_site_css`, `test_site_demo`, `test_site_density_cards`, `test_site_emulator_page`, `test_site_emulators`, `test_site_entry`, `test_site_entry_tables`, `test_site_exports`, `test_site_freshness`, `test_site_funnel`, `test_site_images`, `test_site_inputs`, `test_site_insights`, `test_site_integration`, `test_site_nav`, `test_site_page_text`, `test_site_picker`, `test_site_platform_density`, `test_site_platform_hashes`, `test_site_privacy`, `test_site_pronouns`, `test_site_reference`, `test_site_render`, `test_site_search`, `test_site_steps`, `test_site_system_links`, `test_site_system_names`, `test_site_system_sections`, `test_site_systems`, `test_site_validation`, `test_site_wanted`, `test_site_weight`, `test_site_wiki`, `test_site_write`, `test_source_ref_targets`, `test_upstream`, `test_upstream_index`, `test_validate_pr`, `test_validate_pr_flow`, `test_validate_pr_hashes`, `test_version_basis`, `test_workflow_paths` | +| Scrapers, upstream and provenance | inline sources, synthetic | `test_auto_fetch_lookup`, `test_batocera_md5_list`, `test_find_embedded`, `test_report_excerpt`, `test_check_freshness`, `test_cited_lines`, `test_contributing_text`, `test_coverage_cache`, `test_data_dir_refs`, `test_dataclass_defaults`, `test_dedup`, `test_doc_pages`, `test_doc_surfaces`, `test_elec_scrapers`, `test_fbneo_parser`, `test_find_pinned_revision`, `test_hash_merge`, `test_launchers`, `test_launchers_amberelec`, `test_launchers_emudeck`, `test_launchers_emuelec`, `test_launchers_knulli`, `test_launchers_recalbox`, `test_launchers_retrobat`, `test_launchers_retrodeck`, `test_launchers_retropie`, `test_launchers_rocknix`, `test_lines`, `test_listxml`, `test_mame_devices`, `test_mame_parser`, `test_mame_ref_audit`, `test_optional_dependencies`, `test_pin_build`, `test_profile_sync`, `test_prose_style`, `test_provenance`, `test_refresh_data_dirs`, `test_refresh_failures`, `test_refresh_stale`, `test_retired_files`, `test_retrodeck_scraper_errors`, `test_romset_recipes`, `test_schema_semantic_gate`, `test_scraper_contract`, `test_scraper_network`, `test_site_agents`, `test_site_arcade_boards`, `test_site_availability`, `test_site_bootstrap`, `test_site_built_gate`, `test_site_components`, `test_site_console_folders`, `test_site_content_data`, `test_site_copy`, `test_site_cores`, `test_site_css`, `test_site_demo`, `test_site_density_cards`, `test_site_emulator_page`, `test_site_emulators`, `test_site_entry`, `test_site_entry_tables`, `test_site_exports`, `test_site_freshness`, `test_site_funnel`, `test_site_images`, `test_site_inputs`, `test_site_insights`, `test_site_integration`, `test_site_nav`, `test_site_page_text`, `test_site_picker`, `test_site_platform_density`, `test_site_platform_hashes`, `test_site_privacy`, `test_site_pronouns`, `test_site_reference`, `test_site_render`, `test_site_search`, `test_site_steps`, `test_site_system_links`, `test_site_system_names`, `test_site_system_sections`, `test_site_systems`, `test_site_validation`, `test_site_wanted`, `test_site_weight`, `test_site_wiki`, `test_site_write`, `test_source_ref_targets`, `test_text`, `test_upstream`, `test_upstream_index`, `test_validate_pr`, `test_validate_pr_flow`, `test_validate_pr_hashes`, `test_version_basis`, `test_workflow_paths` | | Games on the card | small DATs, listxml and setup sources, a fake fetcher, fixture install lists, and the committed data against its schemas | `test_arcade_parents`, `test_game_catalogs`, `test_game_headers`, `test_game_regions`, `test_games_index`, `test_romfolders_card`, `test_romfolders_es` | ## Test architecture