From 057fd2d0f6471a3fbdad28738bda3c1ce1e8e4e5 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Fri, 6 Nov 2026 15:14:05 +0100 Subject: [PATCH] fix: isolate every test module however it runs tests/__init__.py keeps a run offline, its scratch under tmp/ and its installer cache its own, but only discover -s tests -t . imported it. discover tests ran with RETROBIOS_OFFLINE unset, scratch on the /tmp tmpfs and the user's real installer cache, the setting in which e2e fixtures had written into the shared .cache/large. Every test module now imports the package first, and a test fails on a module that does not. test_verify_listing.py took its line with the previous commit. --- tests/test_adler32_resolution.py | 2 ++ tests/test_agnostic_scan.py | 2 ++ tests/test_agnostic_scan_mode.py | 2 ++ tests/test_agnostic_scope.py | 2 ++ tests/test_agnostic_substitute.py | 2 ++ tests/test_amberelec_targets.py | 2 ++ tests/test_arcade_parents.py | 2 ++ tests/test_archive_choice.py | 2 ++ tests/test_archive_recipes.py | 2 ++ tests/test_artifact_lock.py | 2 ++ tests/test_atomic_artifacts.py | 2 ++ tests/test_audit_regressions.py | 42 +++++++++++++++++++++++ tests/test_autorun.py | 2 ++ tests/test_batocera_cores.py | 2 ++ tests/test_batocera_md5_list.py | 2 ++ tests/test_bios_companions.py | 2 ++ tests/test_bios_layout.py | 2 ++ tests/test_bundled_identity.py | 2 ++ tests/test_cache_independent_counts.py | 2 ++ tests/test_campaign.py | 2 ++ tests/test_case_insensitive_platforms.py | 2 ++ tests/test_casefold_cache.py | 2 ++ tests/test_check_freshness.py | 2 ++ tests/test_check_release.py | 2 ++ tests/test_checks_have_values.py | 2 ++ tests/test_cited_lines.py | 2 ++ tests/test_contributing_text.py | 2 ++ tests/test_core_data_trees.py | 2 ++ tests/test_core_file_fills_declaration.py | 2 ++ tests/test_core_probe.py | 2 ++ tests/test_core_size_refusal.py | 2 ++ tests/test_coverage_cache.py | 2 ++ tests/test_cross_reference_sources.py | 2 ++ tests/test_crypto_aes.py | 2 ++ tests/test_crypto_unique_data.py | 2 ++ tests/test_crypto_verify.py | 2 ++ tests/test_data_dir_refs.py | 2 ++ tests/test_dataclass_defaults.py | 2 ++ tests/test_db_aliases.py | 2 ++ tests/test_declared_names.py | 2 ++ tests/test_dedup.py | 2 ++ tests/test_derivations.py | 2 ++ tests/test_deterministic_zip.py | 2 ++ tests/test_directory_entries.py | 2 ++ tests/test_doc_pages.py | 2 ++ tests/test_doc_surfaces.py | 2 ++ tests/test_download.py | 2 ++ tests/test_e2e.py | 2 ++ tests/test_elec_scrapers.py | 2 ++ tests/test_emuelec_targets.py | 2 ++ tests/test_emulator_pack_counts.py | 2 ++ tests/test_entry_categories.py | 2 ++ tests/test_export_counts.py | 2 ++ tests/test_export_native_layer.py | 2 ++ tests/test_export_report.py | 2 ++ tests/test_exporters.py | 2 ++ tests/test_extra_identity.py | 2 ++ tests/test_extract_targets.py | 2 ++ tests/test_fbneo_parser.py | 2 ++ tests/test_file_consumers.py | 2 ++ tests/test_fileless_audit.py | 2 ++ tests/test_finalize_pack_names.py | 2 ++ tests/test_find_pinned_revision.py | 2 ++ tests/test_flycast_layout.py | 2 ++ tests/test_foreign_tree.py | 2 ++ tests/test_foreign_tree_names.py | 2 ++ tests/test_frontend_digest.py | 2 ++ tests/test_game_catalogs.py | 2 ++ tests/test_game_data_homonyms.py | 2 ++ tests/test_game_headers.py | 2 ++ tests/test_game_regions.py | 2 ++ tests/test_games_index.py | 2 ++ tests/test_gap_settlement.py | 2 ++ tests/test_handheld_launchers.py | 2 ++ tests/test_hash_merge.py | 2 ++ tests/test_hashing.py | 2 ++ tests/test_hidden_extras.py | 2 ++ tests/test_identity.py | 2 ++ tests/test_install.py | 2 ++ tests/test_install_app.py | 2 ++ tests/test_install_cores.py | 2 ++ tests/test_install_experience.py | 2 ++ tests/test_install_from.py | 2 ++ tests/test_install_games.py | 2 ++ tests/test_install_offline.py | 2 ++ tests/test_install_selection.py | 2 ++ tests/test_install_tui.py | 2 ++ tests/test_lakka_targets.py | 2 ++ tests/test_large_file_cache.py | 2 ++ tests/test_launcher_aliases.py | 2 ++ tests/test_launcher_layer.py | 2 ++ tests/test_launchers.py | 2 ++ tests/test_launchers_emudeck.py | 2 ++ tests/test_launchers_recalbox.py | 2 ++ tests/test_launchers_retrobat.py | 2 ++ tests/test_launchers_retrodeck.py | 2 ++ tests/test_launchers_retropie.py | 2 ++ tests/test_launchers_rocknix.py | 2 ++ tests/test_libretro_layout.py | 2 ++ tests/test_libretro_slugs.py | 2 ++ tests/test_maker_folder_names.py | 2 ++ tests/test_mame_devices.py | 2 ++ tests/test_mame_parser.py | 2 ++ tests/test_mame_ref_audit.py | 2 ++ tests/test_manifest_entry.py | 2 ++ tests/test_md5_pack_context.py | 2 ++ tests/test_measurements.py | 2 ++ tests/test_minui_platform.py | 2 ++ tests/test_name_tiebreak.py | 2 ++ tests/test_native_mode.py | 2 ++ tests/test_nec_filing.py | 2 ++ tests/test_no_case_collisions.py | 2 ++ tests/test_no_game_data.py | 2 ++ tests/test_np2_fonts.py | 2 ++ tests/test_optional_dependencies.py | 2 ++ tests/test_owner_resolution.py | 2 ++ tests/test_pack_conformance_dirs.py | 2 ++ tests/test_pack_core_extras.py | 2 ++ tests/test_pack_counts.py | 2 ++ tests/test_pack_destinations.py | 2 ++ tests/test_pack_failures.py | 2 ++ tests/test_pack_file_names.py | 2 ++ tests/test_pack_grouping.py | 2 ++ tests/test_pack_integrity.py | 2 ++ tests/test_pack_member_identity.py | 2 ++ tests/test_pack_probe.py | 2 ++ tests/test_pack_readme.py | 2 ++ tests/test_path_conflict_status.py | 2 ++ tests/test_path_null_copies.py | 2 ++ tests/test_path_suffix.py | 2 ++ tests/test_pin_build.py | 2 ++ tests/test_platform_inheritance.py | 2 ++ tests/test_platform_keys.py | 2 ++ tests/test_port.py | 2 ++ tests/test_profile_checks.py | 2 ++ tests/test_profile_names.py | 2 ++ tests/test_profile_paths.py | 2 ++ tests/test_profile_repositories.py | 2 ++ tests/test_profile_sync.py | 2 ++ tests/test_prose_style.py | 2 ++ tests/test_provenance.py | 2 ++ tests/test_refresh_data_dirs.py | 2 ++ tests/test_refresh_failures.py | 2 ++ tests/test_refresh_stale.py | 2 ++ tests/test_region.py | 2 ++ tests/test_region_agnostic_scan.py | 2 ++ tests/test_region_check.py | 2 ++ tests/test_region_groups.py | 2 ++ tests/test_region_held.py | 2 ++ tests/test_region_platform_index.py | 2 ++ tests/test_region_required_only.py | 2 ++ tests/test_release_packs.py | 2 ++ tests/test_required_only_archives.py | 2 ++ tests/test_required_only_twins.py | 2 ++ tests/test_resolution_evidence.py | 2 ++ tests/test_retired_files.py | 2 ++ tests/test_retrodeck_scraper_errors.py | 2 ++ tests/test_romfolders_card.py | 2 ++ tests/test_romfolders_es.py | 2 ++ tests/test_romm_hash_rule.py | 2 ++ tests/test_romset_recipes.py | 2 ++ tests/test_save_root.py | 2 ++ tests/test_schema_semantic_gate.py | 2 ++ tests/test_scraper_contract.py | 2 ++ tests/test_sega_filing.py | 2 ++ tests/test_shared_groups.py | 2 ++ tests/test_shipped_content.py | 2 ++ tests/test_site_arcade_boards.py | 2 ++ tests/test_site_availability.py | 2 ++ tests/test_site_bootstrap.py | 2 ++ tests/test_site_built_gate.py | 2 ++ tests/test_site_components.py | 2 ++ tests/test_site_console_folders.py | 2 ++ tests/test_site_content_data.py | 2 ++ tests/test_site_copy.py | 2 ++ tests/test_site_cores.py | 2 ++ tests/test_site_css.py | 2 ++ tests/test_site_density_cards.py | 2 ++ tests/test_site_emulator_page.py | 2 ++ tests/test_site_emulators.py | 2 ++ tests/test_site_entry.py | 2 ++ tests/test_site_entry_tables.py | 2 ++ tests/test_site_exports.py | 2 ++ tests/test_site_funnel.py | 2 ++ tests/test_site_images.py | 2 ++ tests/test_site_inputs.py | 2 ++ tests/test_site_insights.py | 2 ++ tests/test_site_integration.py | 2 ++ tests/test_site_nav.py | 2 ++ tests/test_site_picker.py | 2 ++ tests/test_site_platform_density.py | 2 ++ tests/test_site_platform_hashes.py | 2 ++ tests/test_site_privacy.py | 2 ++ tests/test_site_reference.py | 2 ++ tests/test_site_render.py | 2 ++ tests/test_site_search.py | 2 ++ tests/test_site_system_links.py | 2 ++ tests/test_site_system_names.py | 2 ++ tests/test_site_system_sections.py | 2 ++ tests/test_site_systems.py | 2 ++ tests/test_site_validation.py | 2 ++ tests/test_site_weight.py | 2 ++ tests/test_site_wiki.py | 2 ++ tests/test_site_write.py | 2 ++ tests/test_slot.py | 2 ++ tests/test_slots.py | 2 ++ tests/test_slots_shipped_file.py | 2 ++ tests/test_source_ref_targets.py | 2 ++ tests/test_split_extras.py | 2 ++ tests/test_split_names.py | 2 ++ tests/test_split_pack.py | 2 ++ tests/test_standalone_links.py | 2 ++ tests/test_standalone_mode.py | 2 ++ tests/test_standalone_probe.py | 2 ++ tests/test_system_ids.py | 2 ++ tests/test_system_pack_extras.py | 2 ++ tests/test_system_pack_parity.py | 2 ++ tests/test_system_selection.py | 2 ++ tests/test_target_names.py | 2 ++ tests/test_target_scrapers.py | 2 ++ tests/test_target_systems.py | 2 ++ tests/test_target_verify.py | 2 ++ tests/test_tool_messages.py | 2 ++ tests/test_torrentzip.py | 2 ++ tests/test_truth_data_dir_readers.py | 2 ++ tests/test_truth_diff.py | 2 ++ tests/test_truth_layout.py | 2 ++ tests/test_twin_declaration_status.py | 2 ++ tests/test_twin_declarations.py | 2 ++ tests/test_undeclared_dedup.py | 2 ++ tests/test_unplaced_extras.py | 2 ++ tests/test_upstream.py | 2 ++ tests/test_upstream_index.py | 2 ++ tests/test_validate_pr.py | 2 ++ tests/test_validate_pr_flow.py | 2 ++ tests/test_validate_pr_hashes.py | 2 ++ tests/test_validated_choice.py | 2 ++ tests/test_validation_scope.py | 2 ++ tests/test_variant_choice.py | 2 ++ tests/test_variant_identity.py | 2 ++ tests/test_verify_all_dir.py | 2 ++ tests/test_verify_data_dir_notice.py | 2 ++ tests/test_verify_emulator_evidence.py | 2 ++ tests/test_verify_pack_choice.py | 2 ++ tests/test_verify_release_asset.py | 2 ++ tests/test_version_basis.py | 2 ++ tests/test_which_pack.py | 2 ++ tests/test_workflow_paths.py | 2 ++ tests/test_zipped_member.py | 2 ++ wiki/testing-guide.md | 10 ++++-- 250 files changed, 546 insertions(+), 2 deletions(-) diff --git a/tests/test_adler32_resolution.py b/tests/test_adler32_resolution.py index 5c6f2f502..c90aba144 100644 --- a/tests/test_adler32_resolution.py +++ b/tests/test_adler32_resolution.py @@ -9,6 +9,8 @@ corrected it later, every other reader of the resolution did not. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import json import shutil diff --git a/tests/test_agnostic_scan.py b/tests/test_agnostic_scan.py index 94d6d3680..254527ca3 100644 --- a/tests/test_agnostic_scan.py +++ b/tests/test_agnostic_scan.py @@ -12,6 +12,8 @@ BIOS root of platforms that do not run that emulator. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import sys import tempfile diff --git a/tests/test_agnostic_scan_mode.py b/tests/test_agnostic_scan_mode.py index 7e165aa02..c8db42d81 100644 --- a/tests/test_agnostic_scan_mode.py +++ b/tests/test_agnostic_scan_mode.py @@ -8,6 +8,8 @@ libretro core, while verify set the entry aside. Reads the repository. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import os import sys import unittest diff --git a/tests/test_agnostic_scope.py b/tests/test_agnostic_scope.py index fac69e8e7..3a1d3d27a 100644 --- a/tests/test_agnostic_scope.py +++ b/tests/test_agnostic_scope.py @@ -9,6 +9,8 @@ was not where it looks. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import os import sys diff --git a/tests/test_agnostic_substitute.py b/tests/test_agnostic_substitute.py index 8ba581e2f..8b30d53d7 100644 --- a/tests/test_agnostic_substitute.py +++ b/tests/test_agnostic_substitute.py @@ -7,6 +7,8 @@ the slot missing and the manifest omitted it. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import re import sys import tempfile diff --git a/tests/test_amberelec_targets.py b/tests/test_amberelec_targets.py index 3724fd0d5..5abb32518 100644 --- a/tests/test_amberelec_targets.py +++ b/tests/test_amberelec_targets.py @@ -8,6 +8,8 @@ the firmware of cores its image never had. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_arcade_parents.py b/tests/test_arcade_parents.py index c03b4caa1..ca50d79a3 100644 --- a/tests/test_arcade_parents.py +++ b/tests/test_arcade_parents.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import io import json import tempfile diff --git a/tests/test_archive_choice.py b/tests/test_archive_choice.py index cee358bae..65cc92ddb 100644 --- a/tests/test_archive_choice.py +++ b/tests/test_archive_choice.py @@ -7,6 +7,8 @@ seven of the eight members Batocera checks were missing. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import os import shutil diff --git a/tests/test_archive_recipes.py b/tests/test_archive_recipes.py index cdfbd1f63..551cf5d9d 100644 --- a/tests/test_archive_recipes.py +++ b/tests/test_archive_recipes.py @@ -9,6 +9,8 @@ those members were never read there, and the archive matched no recipe. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import sys import unittest diff --git a/tests/test_artifact_lock.py b/tests/test_artifact_lock.py index 72804b1cb..c99ce7c4d 100644 --- a/tests/test_artifact_lock.py +++ b/tests/test_artifact_lock.py @@ -7,6 +7,8 @@ ZIPs, which surfaces as BadZipFile far from its cause. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import os import subprocess import sys diff --git a/tests/test_atomic_artifacts.py b/tests/test_atomic_artifacts.py index f506b7573..51c652114 100644 --- a/tests/test_atomic_artifacts.py +++ b/tests/test_atomic_artifacts.py @@ -8,6 +8,8 @@ path in bios/: a scan running beside the copy hashed the truncated file. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import os import sys import tempfile diff --git a/tests/test_audit_regressions.py b/tests/test_audit_regressions.py index f2664c89f..c5e4a8ecc 100644 --- a/tests/test_audit_regressions.py +++ b/tests/test_audit_regressions.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import ast import contextlib import hashlib @@ -253,6 +255,46 @@ class AModuleRunAloneHasItsScratchDirectory(unittest.TestCase): self.assertEqual(proc.stdout.split(), [scratch, scratch]) +class EveryTestModuleImportsTheIsolation(unittest.TestCase): + """tests/__init__.py keeps a run offline, its scratch under tmp/ and its + installer cache its own, but only `discover -s tests -t .` imported it: + `discover tests` ran with RETROBIOS_OFFLINE unset, scratch in /tmp and + the user's real cache. Each module now imports the package first.""" + + def test_the_package_import_comes_before_any_other(self): + missing = [] + for path in sorted((ROOT / "tests").glob("test_*.py")): + body = ast.parse(path.read_text(encoding="utf-8")).body + imports = [ + node for node in body + if isinstance(node, (ast.Import, ast.ImportFrom)) + and getattr(node, "module", None) != "__future__" + ] + first = imports[0] if imports else None + if not (isinstance(first, ast.Import) + and [alias.name for alias in first.names] == ["tests"]): + missing.append(path.name) + self.assertEqual(missing, []) + + def test_discover_without_a_top_level_runs_isolated(self): + env = {k: v for k, v in os.environ.items() + if k not in ("RETROBIOS_OFFLINE", "TMPDIR", "RETROBIOS_CACHE")} + proc = subprocess.run( + [sys.executable, "-c", + "import os, sys, tempfile, unittest\n" + "unittest.TestLoader().discover('tests', pattern='test_artifact_lock.py')\n" + "print(os.environ.get('RETROBIOS_OFFLINE'), tempfile.gettempdir()," + " os.environ.get('RETROBIOS_CACHE'))\n"], + cwd=ROOT, env=env, capture_output=True, text=True, timeout=120, + check=False, + ) + self.assertEqual(proc.returncode, 0, proc.stderr) + offline, scratch, cache = proc.stdout.split() + self.assertEqual(offline, "1") + self.assertEqual(scratch, str(ROOT / "tmp" / "tests")) + self.assertEqual(cache, str(ROOT / "tmp" / "tests" / "cache")) + + class ReleaseSigningRegressions(unittest.TestCase): """A checksum list published beside its own artifacts proves nothing. diff --git a/tests/test_autorun.py b/tests/test_autorun.py index ad15f7421..1600b99d1 100644 --- a/tests/test_autorun.py +++ b/tests/test_autorun.py @@ -7,6 +7,8 @@ a function returning canned CI runs. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import io import json diff --git a/tests/test_batocera_cores.py b/tests/test_batocera_cores.py index 159912e07..eeeff5203 100644 --- a/tests/test_batocera_cores.py +++ b/tests/test_batocera_cores.py @@ -9,6 +9,8 @@ under it: amiberry, fsuae and vice were never in a target list. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_batocera_md5_list.py b/tests/test_batocera_md5_list.py index 223d2add5..cc207dd7d 100644 --- a/tests/test_batocera_md5_list.py +++ b/tests/test_batocera_md5_list.py @@ -9,6 +9,8 @@ a list, and verify accepts any listed md5. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import sys import tempfile diff --git a/tests/test_bios_companions.py b/tests/test_bios_companions.py index 6f0bbe0d8..de9d9c45b 100644 --- a/tests/test_bios_companions.py +++ b/tests/test_bios_companions.py @@ -9,6 +9,8 @@ the Batocera BIOS folder. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_bios_layout.py b/tests/test_bios_layout.py index e447e43b9..5a9f73d66 100644 --- a/tests/test_bios_layout.py +++ b/tests/test_bios_layout.py @@ -7,6 +7,8 @@ Oric and Tangerine: one machine, two folders, two pages. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import subprocess import unittest from pathlib import Path diff --git a/tests/test_bundled_identity.py b/tests/test_bundled_identity.py index 77eb121f1..d05fb9e18 100644 --- a/tests/test_bundled_identity.py +++ b/tests/test_bundled_identity.py @@ -13,6 +13,8 @@ entry is written with the hash of the file the emulator ships. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import sys import unittest diff --git a/tests/test_cache_independent_counts.py b/tests/test_cache_independent_counts.py index 69a52ec15..62def66ae 100644 --- a/tests/test_cache_independent_counts.py +++ b/tests/test_cache_independent_counts.py @@ -10,6 +10,8 @@ directory cache is not a collection. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import os import sys import unittest diff --git a/tests/test_campaign.py b/tests/test_campaign.py index 5966dd8d7..f1f41b7cb 100644 --- a/tests/test_campaign.py +++ b/tests/test_campaign.py @@ -10,6 +10,8 @@ resume and rerun on a changed core. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import hashlib import io diff --git a/tests/test_case_insensitive_platforms.py b/tests/test_case_insensitive_platforms.py index 1eeb9be6c..168460fcc 100644 --- a/tests/test_case_insensitive_platforms.py +++ b/tests/test_case_insensitive_platforms.py @@ -7,6 +7,8 @@ went red. The flag lived in retrobat.yml and vanished at the next scrape. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import hashlib import io diff --git a/tests/test_casefold_cache.py b/tests/test_casefold_cache.py index 9105f9cac..3e6d50631 100644 --- a/tests/test_casefold_cache.py +++ b/tests/test_casefold_cache.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_check_freshness.py b/tests/test_check_freshness.py index 829062f66..0aa42c799 100644 --- a/tests/test_check_freshness.py +++ b/tests/test_check_freshness.py @@ -8,6 +8,8 @@ report is folded, since each of those decides whether a row says STALE. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import os import sys diff --git a/tests/test_check_release.py b/tests/test_check_release.py index 50a305f7c..c821b7bab 100644 --- a/tests/test_check_release.py +++ b/tests/test_check_release.py @@ -7,6 +7,8 @@ whose checksums every user's `sha256sum --check` rejected. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_checks_have_values.py b/tests/test_checks_have_values.py index 91c1fe841..8d9cea7a3 100644 --- a/tests/test_checks_have_values.py +++ b/tests/test_checks_have_values.py @@ -6,6 +6,8 @@ one. validate_schemas now refuses it. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import subprocess import sys import unittest diff --git a/tests/test_cited_lines.py b/tests/test_cited_lines.py index bbf380f4f..1cf8794e5 100644 --- a/tests/test_cited_lines.py +++ b/tests/test_cited_lines.py @@ -7,6 +7,8 @@ does not hold the file. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import re import sys import unittest diff --git a/tests/test_contributing_text.py b/tests/test_contributing_text.py index 593ad04fa..3e16e4838 100644 --- a/tests/test_contributing_text.py +++ b/tests/test_contributing_text.py @@ -6,6 +6,8 @@ the repository, five on the site, under two different titles. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import re import sys import unittest diff --git a/tests/test_core_data_trees.py b/tests/test_core_data_trees.py index f9de142f5..2fb6e7f3e 100644 --- a/tests/test_core_data_trees.py +++ b/tests/test_core_data_trees.py @@ -10,6 +10,8 @@ reader now gets the tree, or the profile says its package installs it. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import os import sys import unittest diff --git a/tests/test_core_file_fills_declaration.py b/tests/test_core_file_fills_declaration.py index 1f9260057..499f67dd2 100644 --- a/tests/test_core_file_fills_declaration.py +++ b/tests/test_core_file_fills_declaration.py @@ -8,6 +8,8 @@ frontend sees a file at the path. verify kept it MISSING, so the pack said from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import contextlib import io diff --git a/tests/test_core_probe.py b/tests/test_core_probe.py index 60a8e1fc8..1c866ffc7 100644 --- a/tests/test_core_probe.py +++ b/tests/test_core_probe.py @@ -7,6 +7,8 @@ probe on it: staging, the worker process, strace, the record and its schema. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import argparse import contextlib import hashlib diff --git a/tests/test_core_size_refusal.py b/tests/test_core_size_refusal.py index 32f5615bc..8c4a437f6 100644 --- a/tests/test_core_size_refusal.py +++ b/tests/test_core_size_refusal.py @@ -10,6 +10,8 @@ read one rule (validation.core_size_refusal). from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import os import sys diff --git a/tests/test_coverage_cache.py b/tests/test_coverage_cache.py index 8c2b56175..8dd05038b 100644 --- a/tests/test_coverage_cache.py +++ b/tests/test_coverage_cache.py @@ -9,6 +9,8 @@ tests change an input and expect a fresh computation. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import tempfile import unittest diff --git a/tests/test_cross_reference_sources.py b/tests/test_cross_reference_sources.py index 67de9cbfa..6f96e2d8e 100644 --- a/tests/test_cross_reference_sources.py +++ b/tests/test_cross_reference_sources.py @@ -9,6 +9,8 @@ a directory called ROM). from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import tempfile import unittest diff --git a/tests/test_crypto_aes.py b/tests/test_crypto_aes.py index fd399d15f..1e86433f1 100644 --- a/tests/test_crypto_aes.py +++ b/tests/test_crypto_aes.py @@ -7,6 +7,8 @@ contributor with none of them. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import ast import sys import unittest diff --git a/tests/test_crypto_unique_data.py b/tests/test_crypto_unique_data.py index b2e2d6ae8..a7428f68f 100644 --- a/tests/test_crypto_unique_data.py +++ b/tests/test_crypto_unique_data.py @@ -18,6 +18,8 @@ Layouts, from Azahar src/core/hw/unique_data.cpp and src/core/file_sys/otp.cpp: from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import struct import sys diff --git a/tests/test_crypto_verify.py b/tests/test_crypto_verify.py index 53e8e1ab7..a6f160bdd 100644 --- a/tests/test_crypto_verify.py +++ b/tests/test_crypto_verify.py @@ -14,6 +14,8 @@ constants rather than against itself. The AES vector is from NIST SP 800-38A. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import shutil import sys diff --git a/tests/test_data_dir_refs.py b/tests/test_data_dir_refs.py index df5d00bac..9793ea24d 100644 --- a/tests/test_data_dir_refs.py +++ b/tests/test_data_dir_refs.py @@ -6,6 +6,8 @@ verify only said "not cached" and refresh_data_dirs had nothing to fetch. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_dataclass_defaults.py b/tests/test_dataclass_defaults.py index 53019b75d..fd9fbca22 100644 --- a/tests/test_dataclass_defaults.py +++ b/tests/test_dataclass_defaults.py @@ -7,6 +7,8 @@ TypeError on the first loop. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import ast import unittest from pathlib import Path diff --git a/tests/test_db_aliases.py b/tests/test_db_aliases.py index 1c456e65c..0c51d415f 100644 --- a/tests/test_db_aliases.py +++ b/tests/test_db_aliases.py @@ -8,6 +8,8 @@ disk ROM then served the CoCo one. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import os import sys import tempfile diff --git a/tests/test_declared_names.py b/tests/test_declared_names.py index 42868fe4b..630c60aa3 100644 --- a/tests/test_declared_names.py +++ b/tests/test_declared_names.py @@ -8,6 +8,8 @@ set, enriched with every spelling the database knows. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_dedup.py b/tests/test_dedup.py index d0badfbae..0b6d31790 100644 --- a/tests/test_dedup.py +++ b/tests/test_dedup.py @@ -9,6 +9,8 @@ are both load-bearing. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import io import os diff --git a/tests/test_derivations.py b/tests/test_derivations.py index 580bf32e5..061205b0b 100644 --- a/tests/test_derivations.py +++ b/tests/test_derivations.py @@ -7,6 +7,8 @@ is two held ROMs end to end. The gap report listed them as acquisition targets. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import os import shutil diff --git a/tests/test_deterministic_zip.py b/tests/test_deterministic_zip.py index 359f508c2..293f84b91 100644 --- a/tests/test_deterministic_zip.py +++ b/tests/test_deterministic_zip.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import os import tempfile diff --git a/tests/test_directory_entries.py b/tests/test_directory_entries.py index e8472f32f..3bd952006 100644 --- a/tests/test_directory_entries.py +++ b/tests/test_directory_entries.py @@ -9,6 +9,8 @@ reported missing while 3 584 collected files stayed out of every pack. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import json import sys diff --git a/tests/test_doc_pages.py b/tests/test_doc_pages.py index cdd6c3ed1..dbdf0c8b5 100644 --- a/tests/test_doc_pages.py +++ b/tests/test_doc_pages.py @@ -7,6 +7,8 @@ code moves, and nothing else notices. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import ast import hashlib import inspect diff --git a/tests/test_doc_surfaces.py b/tests/test_doc_surfaces.py index b7a53ee06..75daca3d0 100644 --- a/tests/test_doc_surfaces.py +++ b/tests/test_doc_surfaces.py @@ -9,6 +9,8 @@ tool prints, and a size is the one the release record holds. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import ast import contextlib import re diff --git a/tests/test_download.py b/tests/test_download.py index 154f780ca..8923a2134 100644 --- a/tests/test_download.py +++ b/tests/test_download.py @@ -9,6 +9,8 @@ checksum of each layout and the staging location. """ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import functools import hashlib diff --git a/tests/test_e2e.py b/tests/test_e2e.py index 894b43a44..d876b56d4 100644 --- a/tests/test_e2e.py +++ b/tests/test_e2e.py @@ -17,6 +17,8 @@ Covers: from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import hashlib import io diff --git a/tests/test_elec_scrapers.py b/tests/test_elec_scrapers.py index aeace915c..0ee2f1950 100644 --- a/tests/test_elec_scrapers.py +++ b/tests/test_elec_scrapers.py @@ -9,6 +9,8 @@ upstream files. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_emuelec_targets.py b/tests/test_emuelec_targets.py index c8f911433..77e8b2ec1 100644 --- a/tests/test_emuelec_targets.py +++ b/tests/test_emuelec_targets.py @@ -9,6 +9,8 @@ firmware of cores its image never had. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import sys import unittest diff --git a/tests/test_emulator_pack_counts.py b/tests/test_emulator_pack_counts.py index 10faa9154..654ff5c20 100644 --- a/tests/test_emulator_pack_counts.py +++ b/tests/test_emulator_pack_counts.py @@ -9,6 +9,8 @@ names and ten "missing". from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import re import subprocess import sys diff --git a/tests/test_entry_categories.py b/tests/test_entry_categories.py index 0f971c5d9..bd1e849d2 100644 --- a/tests/test_entry_categories.py +++ b/tests/test_entry_categories.py @@ -6,6 +6,8 @@ from what the cores the platform runs open, never from the entry's name. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_export_counts.py b/tests/test_export_counts.py index f0abfc261..79734c9bd 100644 --- a/tests/test_export_counts.py +++ b/tests/test_export_counts.py @@ -9,6 +9,8 @@ from a file other than the one the hash describes. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import sys import unittest diff --git a/tests/test_export_native_layer.py b/tests/test_export_native_layer.py index 6e93642d5..7c9446218 100644 --- a/tests/test_export_native_layer.py +++ b/tests/test_export_native_layer.py @@ -9,6 +9,8 @@ libretro's System.dat (N88EXT0-3.ROM) as if libretro declared them. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import tempfile import unittest diff --git a/tests/test_export_report.py b/tests/test_export_report.py index 1b25ab45e..e3127fe9f 100644 --- a/tests/test_export_report.py +++ b/tests/test_export_report.py @@ -7,6 +7,8 @@ file from and no list to check the diff against. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import re import sys import tempfile diff --git a/tests/test_exporters.py b/tests/test_exporters.py index 8dc24b4ff..ccd275ccf 100644 --- a/tests/test_exporters.py +++ b/tests/test_exporters.py @@ -14,6 +14,8 @@ and skip when it has not been populated (python scripts/export_native.py from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import difflib import io import json diff --git a/tests/test_extra_identity.py b/tests/test_extra_identity.py index a0761e39c..1f1faca65 100644 --- a/tests/test_extra_identity.py +++ b/tests/test_extra_identity.py @@ -8,6 +8,8 @@ Galaksija ROM and a PS2 ROM2.BIN. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_extract_targets.py b/tests/test_extract_targets.py index 9ba78bf4b..59c8022f8 100644 --- a/tests/test_extract_targets.py +++ b/tests/test_extract_targets.py @@ -9,6 +9,8 @@ have vanished with it. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_fbneo_parser.py b/tests/test_fbneo_parser.py index 4a16c2c2b..583e75140 100644 --- a/tests/test_fbneo_parser.py +++ b/tests/test_fbneo_parser.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import tempfile import unittest from pathlib import Path diff --git a/tests/test_file_consumers.py b/tests/test_file_consumers.py index 1d382916f..87b2495ee 100644 --- a/tests/test_file_consumers.py +++ b/tests/test_file_consumers.py @@ -8,6 +8,8 @@ homonym tests/test_game_data_homonyms.py forbids the resolver to serve. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import sys import tempfile diff --git a/tests/test_fileless_audit.py b/tests/test_fileless_audit.py index 7d469ab4f..8409bb19c 100644 --- a/tests/test_fileless_audit.py +++ b/tests/test_fileless_audit.py @@ -8,6 +8,8 @@ directory, and only a manual reading found it. """ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import tempfile import unittest diff --git a/tests/test_finalize_pack_names.py b/tests/test_finalize_pack_names.py index fe7c8e686..7dff70d1c 100644 --- a/tests/test_finalize_pack_names.py +++ b/tests/test_finalize_pack_names.py @@ -7,6 +7,8 @@ attached to misterfpga by substring and checked against the full list: from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import os import sys import tempfile diff --git a/tests/test_find_pinned_revision.py b/tests/test_find_pinned_revision.py index 473633fd5..974010a55 100644 --- a/tests/test_find_pinned_revision.py +++ b/tests/test_find_pinned_revision.py @@ -6,6 +6,8 @@ today's upstream no longer carries, but the bytes are in the project's history. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import sys import unittest diff --git a/tests/test_flycast_layout.py b/tests/test_flycast_layout.py index 81e60b699..3bbd01358 100644 --- a/tests/test_flycast_layout.py +++ b/tests/test_flycast_layout.py @@ -9,6 +9,8 @@ and put every file one directory too deep. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import unittest from pathlib import Path diff --git a/tests/test_foreign_tree.py b/tests/test_foreign_tree.py index 47056e553..b8260e8af 100644 --- a/tests/test_foreign_tree.py +++ b/tests/test_foreign_tree.py @@ -9,6 +9,8 @@ to upstream PCSX2. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import os import sys diff --git a/tests/test_foreign_tree_names.py b/tests/test_foreign_tree_names.py index 360060add..258401f6b 100644 --- a/tests/test_foreign_tree_names.py +++ b/tests/test_foreign_tree_names.py @@ -9,6 +9,8 @@ served while data/bluemsx held the 8 KB one. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import os import shutil diff --git a/tests/test_frontend_digest.py b/tests/test_frontend_digest.py index 14b260385..a4ce6a5cd 100644 --- a/tests/test_frontend_digest.py +++ b/tests/test_frontend_digest.py @@ -8,6 +8,8 @@ the pack and the manifest while verify, comparing md5, called it OK. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import os import sys diff --git a/tests/test_game_catalogs.py b/tests/test_game_catalogs.py index 306d78844..ef3873ed3 100644 --- a/tests/test_game_catalogs.py +++ b/tests/test_game_catalogs.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import subprocess import sys diff --git a/tests/test_game_data_homonyms.py b/tests/test_game_data_homonyms.py index 6e5cc144f..c39d95e43 100644 --- a/tests/test_game_data_homonyms.py +++ b/tests/test_game_data_homonyms.py @@ -12,6 +12,8 @@ carries `unsourceable:` until its own bytes are held. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import os import re diff --git a/tests/test_game_headers.py b/tests/test_game_headers.py index 6a3c63087..1b495bb66 100644 --- a/tests/test_game_headers.py +++ b/tests/test_game_headers.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import re import sys diff --git a/tests/test_game_regions.py b/tests/test_game_regions.py index 97f660eae..b3b76cf6d 100644 --- a/tests/test_game_regions.py +++ b/tests/test_game_regions.py @@ -8,6 +8,8 @@ can lose its backing, then on the repository's own files. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import copy import json import sys diff --git a/tests/test_games_index.py b/tests/test_games_index.py index b7894b42f..07c05e459 100644 --- a/tests/test_games_index.py +++ b/tests/test_games_index.py @@ -7,6 +7,8 @@ so a test pins the join and not the state of the data. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import shutil import sys diff --git a/tests/test_gap_settlement.py b/tests/test_gap_settlement.py index 683044985..917507662 100644 --- a/tests/test_gap_settlement.py +++ b/tests/test_gap_settlement.py @@ -7,6 +7,8 @@ it. RetroArch names Galaksija's 4 KiB galaksija/rom1.bin, so DOSBox's from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_handheld_launchers.py b/tests/test_handheld_launchers.py index ff8d793d9..633d6259a 100644 --- a/tests/test_handheld_launchers.py +++ b/tests/test_handheld_launchers.py @@ -10,6 +10,8 @@ the pad reaching the console, a compositor covering it) is not exercised. """ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import importlib.util import json diff --git a/tests/test_hash_merge.py b/tests/test_hash_merge.py index 079dfe4e5..8b63de4b3 100644 --- a/tests/test_hash_merge.py +++ b/tests/test_hash_merge.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import tempfile import unittest diff --git a/tests/test_hashing.py b/tests/test_hashing.py index d6c6b71e8..6237e4330 100644 --- a/tests/test_hashing.py +++ b/tests/test_hashing.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import shutil import sys import tempfile diff --git a/tests/test_hidden_extras.py b/tests/test_hidden_extras.py index 222b018fa..452c3205c 100644 --- a/tests/test_hidden_extras.py +++ b/tests/test_hidden_extras.py @@ -9,6 +9,8 @@ ROCKNIX's higan SGB1.sfc/program.rom under the file SGB1.sfc. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import os import sys import unittest diff --git a/tests/test_identity.py b/tests/test_identity.py index a90f9796b..fce2c7ca9 100644 --- a/tests/test_identity.py +++ b/tests/test_identity.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import shutil import sys import tempfile diff --git a/tests/test_install.py b/tests/test_install.py index 086d9b697..9effcdd49 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -1,6 +1,8 @@ """Tests for install.py platform detection and config parsing.""" from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import functools import hashlib diff --git a/tests/test_install_app.py b/tests/test_install_app.py index 94d190236..34a4e499d 100644 --- a/tests/test_install_app.py +++ b/tests/test_install_app.py @@ -8,6 +8,8 @@ menu) is not exercised. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import io import json diff --git a/tests/test_install_cores.py b/tests/test_install_cores.py index 55fcbfbf0..7594890fe 100644 --- a/tests/test_install_cores.py +++ b/tests/test_install_cores.py @@ -8,6 +8,8 @@ which cores keep each system, the rule a pack built for a target follows. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import io import json diff --git a/tests/test_install_experience.py b/tests/test_install_experience.py index 2ea164a30..840b948e2 100644 --- a/tests/test_install_experience.py +++ b/tests/test_install_experience.py @@ -7,6 +7,8 @@ honours Retry-After, and large files that resume where they stopped. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import errno import hashlib diff --git a/tests/test_install_from.py b/tests/test_install_from.py index ff28c52c7..9b91ed553 100644 --- a/tests/test_install_from.py +++ b/tests/test_install_from.py @@ -11,6 +11,8 @@ never moved, and checked again once written. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import copy import errno diff --git a/tests/test_install_games.py b/tests/test_install_games.py index 117970364..8388202d0 100644 --- a/tests/test_install_games.py +++ b/tests/test_install_games.py @@ -8,6 +8,8 @@ index, published by scripts/generate_games_index.py. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import functools import gzip diff --git a/tests/test_install_offline.py b/tests/test_install_offline.py index 08d9194d2..2eeb18530 100644 --- a/tests/test_install_offline.py +++ b/tests/test_install_offline.py @@ -9,6 +9,8 @@ installs again from disk, --from-pack, every file checked by its hash. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import hashlib import io diff --git a/tests/test_install_selection.py b/tests/test_install_selection.py index d0cc9dac3..d96329ae7 100644 --- a/tests/test_install_selection.py +++ b/tests/test_install_selection.py @@ -9,6 +9,8 @@ to one answer. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import functools import hashlib diff --git a/tests/test_install_tui.py b/tests/test_install_tui.py index 988b7234e..a7584e71b 100644 --- a/tests/test_install_tui.py +++ b/tests/test_install_tui.py @@ -9,6 +9,8 @@ installs it). from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import argparse import contextlib import errno diff --git a/tests/test_lakka_targets.py b/tests/test_lakka_targets.py index 387ac1502..e4fb1cb31 100644 --- a/tests/test_lakka_targets.py +++ b/tests/test_lakka_targets.py @@ -7,6 +7,8 @@ platform outright. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import unittest from scripts.scraper.targets import lakka_targets_scraper as lakka diff --git a/tests/test_large_file_cache.py b/tests/test_large_file_cache.py index 909ede2cf..bd4dd01d5 100644 --- a/tests/test_large_file_cache.py +++ b/tests/test_large_file_cache.py @@ -8,6 +8,8 @@ that then replaced the cache entry. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import io import json diff --git a/tests/test_launcher_aliases.py b/tests/test_launcher_aliases.py index bd4d5331d..ab7795a02 100644 --- a/tests/test_launcher_aliases.py +++ b/tests/test_launcher_aliases.py @@ -16,6 +16,8 @@ Two checks read the committed data: from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import re import unittest from collections import defaultdict diff --git a/tests/test_launcher_layer.py b/tests/test_launcher_layer.py index e765fe27e..a7f99c230 100644 --- a/tests/test_launcher_layer.py +++ b/tests/test_launcher_layer.py @@ -8,6 +8,8 @@ and a fixed path the launcher passes (Batocera's x16emu shape). from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import inspect import os diff --git a/tests/test_launchers.py b/tests/test_launchers.py index 515d242ee..12a7d06ff 100644 --- a/tests/test_launchers.py +++ b/tests/test_launchers.py @@ -8,6 +8,8 @@ is checked against the revision itself. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import dataclasses import json import sys diff --git a/tests/test_launchers_emudeck.py b/tests/test_launchers_emudeck.py index 33d7596fe..1dd106f6c 100644 --- a/tests/test_launchers_emudeck.py +++ b/tests/test_launchers_emudeck.py @@ -8,6 +8,8 @@ fixture's own lines, and a construct that is gone must stop the scrape. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import textwrap import unittest diff --git a/tests/test_launchers_recalbox.py b/tests/test_launchers_recalbox.py index 5c806f757..381920bc9 100644 --- a/tests/test_launchers_recalbox.py +++ b/tests/test_launchers_recalbox.py @@ -8,6 +8,8 @@ is checked against the tag itself. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import sys import unittest diff --git a/tests/test_launchers_retrobat.py b/tests/test_launchers_retrobat.py index 4a5d80fa6..4d1591452 100644 --- a/tests/test_launchers_retrobat.py +++ b/tests/test_launchers_retrobat.py @@ -8,6 +8,8 @@ the fixture's own lines, and a construct that is gone must stop the scrape. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import textwrap import unittest diff --git a/tests/test_launchers_retrodeck.py b/tests/test_launchers_retrodeck.py index a4af6844f..96401837c 100644 --- a/tests/test_launchers_retrodeck.py +++ b/tests/test_launchers_retrodeck.py @@ -8,6 +8,8 @@ cites. A construct that is gone or unknown must stop the scrape. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import textwrap import unittest diff --git a/tests/test_launchers_retropie.py b/tests/test_launchers_retropie.py index 1412ae5e0..0e5ef9c66 100644 --- a/tests/test_launchers_retropie.py +++ b/tests/test_launchers_retropie.py @@ -8,6 +8,8 @@ cites. A construct that is gone or unknown must stop the scrape. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import dataclasses import json import sys diff --git a/tests/test_launchers_rocknix.py b/tests/test_launchers_rocknix.py index b49097ae3..22596256b 100644 --- a/tests/test_launchers_rocknix.py +++ b/tests/test_launchers_rocknix.py @@ -9,6 +9,8 @@ configs differ, and a construct that is gone must stop the scrape. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import textwrap import unittest diff --git a/tests/test_libretro_layout.py b/tests/test_libretro_layout.py index 76b089802..6b0aa29fb 100644 --- a/tests/test_libretro_layout.py +++ b/tests/test_libretro_layout.py @@ -9,6 +9,8 @@ Sys from system/dolphin-emu/Sys and keeps User in the save directory. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import os import sys import unittest diff --git a/tests/test_libretro_slugs.py b/tests/test_libretro_slugs.py index 1b52ce124..1d571b002 100644 --- a/tests/test_libretro_slugs.py +++ b/tests/test_libretro_slugs.py @@ -9,6 +9,8 @@ duplicate system carrying the quasi88 group. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_maker_folder_names.py b/tests/test_maker_folder_names.py index 8410ac58e..cffe035af 100644 --- a/tests/test_maker_folder_names.py +++ b/tests/test_maker_folder_names.py @@ -11,6 +11,8 @@ remains. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import json import os diff --git a/tests/test_mame_devices.py b/tests/test_mame_devices.py index 4b34edde0..05aa8f36e 100644 --- a/tests/test_mame_devices.py +++ b/tests/test_mame_devices.py @@ -9,6 +9,8 @@ filed under the systems of the machines that can load it, never guessed. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import io import json import tempfile diff --git a/tests/test_mame_parser.py b/tests/test_mame_parser.py index 288e2afd8..c163e845b 100644 --- a/tests/test_mame_parser.py +++ b/tests/test_mame_parser.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import os import tempfile import unittest diff --git a/tests/test_mame_ref_audit.py b/tests/test_mame_ref_audit.py index 69d60ae44..7f6113739 100644 --- a/tests/test_mame_ref_audit.py +++ b/tests/test_mame_ref_audit.py @@ -7,6 +7,8 @@ found nineteen stale refs in one driver where profile_sync had flagged five. """ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import tempfile import unittest diff --git a/tests/test_manifest_entry.py b/tests/test_manifest_entry.py index 3505bbf26..ad18dfe2d 100644 --- a/tests/test_manifest_entry.py +++ b/tests/test_manifest_entry.py @@ -9,6 +9,8 @@ an empty repo_path, and the installer refused the whole manifest. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import ast import json import sys diff --git a/tests/test_md5_pack_context.py b/tests/test_md5_pack_context.py index d3b572206..bac9ef345 100644 --- a/tests/test_md5_pack_context.py +++ b/tests/test_md5_pack_context.py @@ -8,6 +8,8 @@ the bare file names under a pack called Standalone. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import subprocess import sys diff --git a/tests/test_measurements.py b/tests/test_measurements.py index 692b409f3..e38e3ad2a 100644 --- a/tests/test_measurements.py +++ b/tests/test_measurements.py @@ -8,6 +8,8 @@ against HEAD. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import copy import html import json diff --git a/tests/test_minui_platform.py b/tests/test_minui_platform.py index 8807c22f4..5e6ed3ef3 100644 --- a/tests/test_minui_platform.py +++ b/tests/test_minui_platform.py @@ -11,6 +11,8 @@ profiles, placed below that folder. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import hashlib import io diff --git a/tests/test_name_tiebreak.py b/tests/test_name_tiebreak.py index 29cd9566b..9270a30c2 100644 --- a/tests/test_name_tiebreak.py +++ b/tests/test_name_tiebreak.py @@ -7,6 +7,8 @@ without `validation: [size]` keeps its informative status. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import tempfile import unittest diff --git a/tests/test_native_mode.py b/tests/test_native_mode.py index 100412e98..51bf58895 100644 --- a/tests/test_native_mode.py +++ b/tests/test_native_mode.py @@ -10,6 +10,8 @@ it, and these tests make the agreement checkable instead of reviewable. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import io import json diff --git a/tests/test_nec_filing.py b/tests/test_nec_filing.py index 68335af0d..329cf7f08 100644 --- a/tests/test_nec_filing.py +++ b/tests/test_nec_filing.py @@ -9,6 +9,8 @@ no PC-88 emulator reads. Reads the repository. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_no_case_collisions.py b/tests/test_no_case_collisions.py index c9821676c..a724cfca2 100644 --- a/tests/test_no_case_collisions.py +++ b/tests/test_no_case_collisions.py @@ -1,5 +1,7 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import subprocess import unittest from collections import defaultdict diff --git a/tests/test_no_game_data.py b/tests/test_no_game_data.py index 54e835c57..2bb59c2fc 100644 --- a/tests/test_no_game_data.py +++ b/tests/test_no_game_data.py @@ -9,6 +9,8 @@ full manifest. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import functools import hashlib diff --git a/tests/test_np2_fonts.py b/tests/test_np2_fonts.py index fe417bff0..0ff2196dd 100644 --- a/tests/test_np2_fonts.py +++ b/tests/test_np2_fonts.py @@ -9,6 +9,8 @@ which fontpc98_read cannot parse, and FONT.ROM was never placed under its name. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import os import shutil diff --git a/tests/test_optional_dependencies.py b/tests/test_optional_dependencies.py index 1ef0b7a41..feba5a1ee 100644 --- a/tests/test_optional_dependencies.py +++ b/tests/test_optional_dependencies.py @@ -7,6 +7,8 @@ fifteen errors instead of skipped schema checks. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import subprocess import sys import unittest diff --git a/tests/test_owner_resolution.py b/tests/test_owner_resolution.py index f135bd1fa..70141c51a 100644 --- a/tests/test_owner_resolution.py +++ b/tests/test_owner_resolution.py @@ -9,6 +9,8 @@ armsx2's pack ships without a reader, and MAME's neogeo.zip without MAME. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import os import sys diff --git a/tests/test_pack_conformance_dirs.py b/tests/test_pack_conformance_dirs.py index f17d77eb0..659564f6c 100644 --- a/tests/test_pack_conformance_dirs.py +++ b/tests/test_pack_conformance_dirs.py @@ -8,6 +8,8 @@ all and never judged. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import argparse import sys import tempfile diff --git a/tests/test_pack_core_extras.py b/tests/test_pack_core_extras.py index 266763d14..9e659369b 100644 --- a/tests/test_pack_core_extras.py +++ b/tests/test_pack_core_extras.py @@ -9,6 +9,8 @@ builder's in the same run. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import os import sys diff --git a/tests/test_pack_counts.py b/tests/test_pack_counts.py index 1d12c5423..55f34e029 100644 --- a/tests/test_pack_counts.py +++ b/tests/test_pack_counts.py @@ -10,6 +10,8 @@ installer fetches and leaves out the data directories a pack also carries. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import io import json diff --git a/tests/test_pack_destinations.py b/tests/test_pack_destinations.py index 65bd1277d..cf41ce6a3 100644 --- a/tests/test_pack_destinations.py +++ b/tests/test_pack_destinations.py @@ -9,6 +9,8 @@ it and counted one more file from the cores. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import hashlib import io diff --git a/tests/test_pack_failures.py b/tests/test_pack_failures.py index 5e73ac684..9ec1e7d1d 100644 --- a/tests/test_pack_failures.py +++ b/tests/test_pack_failures.py @@ -7,6 +7,8 @@ keep serving from an older run, left the run green. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import argparse import os import sys diff --git a/tests/test_pack_file_names.py b/tests/test_pack_file_names.py index 30bea04c0..cf5c4de43 100644 --- a/tests/test_pack_file_names.py +++ b/tests/test_pack_file_names.py @@ -7,6 +7,8 @@ verify reported the same scope OK. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import sys import tempfile diff --git a/tests/test_pack_grouping.py b/tests/test_pack_grouping.py index d24674c4a..5a45a6740 100644 --- a/tests/test_pack_grouping.py +++ b/tests/test_pack_grouping.py @@ -8,6 +8,8 @@ ruled undecidable, and the keep overrode the drop. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import os import sys import unittest diff --git a/tests/test_pack_integrity.py b/tests/test_pack_integrity.py index 57bc09dc1..a7e7c704e 100644 --- a/tests/test_pack_integrity.py +++ b/tests/test_pack_integrity.py @@ -14,6 +14,8 @@ date pack stays a failure. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import glob import os import subprocess diff --git a/tests/test_pack_member_identity.py b/tests/test_pack_member_identity.py index 63d15f47e..5eeb7d64b 100644 --- a/tests/test_pack_member_identity.py +++ b/tests/test_pack_member_identity.py @@ -8,6 +8,8 @@ recognised by their members. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import io import json diff --git a/tests/test_pack_probe.py b/tests/test_pack_probe.py index de96601cd..3d43ff2c4 100644 --- a/tests/test_pack_probe.py +++ b/tests/test_pack_probe.py @@ -11,6 +11,8 @@ on disk. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import io import json diff --git a/tests/test_pack_readme.py b/tests/test_pack_readme.py index 5a56085cf..83748d59c 100644 --- a/tests/test_pack_readme.py +++ b/tests/test_pack_readme.py @@ -8,6 +8,8 @@ does not have, while the registry names the path. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import re import sys import unittest diff --git a/tests/test_path_conflict_status.py b/tests/test_path_conflict_status.py index 5d7c60690..653064812 100644 --- a/tests/test_path_conflict_status.py +++ b/tests/test_path_conflict_status.py @@ -8,6 +8,8 @@ from the collection read as covered in the pack report and as missing in verify. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import hashlib import io diff --git a/tests/test_path_null_copies.py b/tests/test_path_null_copies.py index eb2a405ea..d3b583c5e 100644 --- a/tests/test_path_null_copies.py +++ b/tests/test_path_null_copies.py @@ -8,6 +8,8 @@ Reads the repository: skips when the database is absent. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import os import sys import unittest diff --git a/tests/test_path_suffix.py b/tests/test_path_suffix.py index 865996528..62ee65d56 100644 --- a/tests/test_path_suffix.py +++ b/tests/test_path_suffix.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import os import shutil import sys diff --git a/tests/test_pin_build.py b/tests/test_pin_build.py index c4f7a4568..ecd3731bc 100644 --- a/tests/test_pin_build.py +++ b/tests/test_pin_build.py @@ -8,6 +8,8 @@ file, and check_freshness reads it again where the platform now stands. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import tempfile import unittest diff --git a/tests/test_platform_inheritance.py b/tests/test_platform_inheritance.py index 10473c882..d4ba642f7 100644 --- a/tests/test_platform_inheritance.py +++ b/tests/test_platform_inheritance.py @@ -8,6 +8,8 @@ scraper and install block. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import shutil import sys import tempfile diff --git a/tests/test_platform_keys.py b/tests/test_platform_keys.py index c11b8788e..95be6420a 100644 --- a/tests/test_platform_keys.py +++ b/tests/test_platform_keys.py @@ -8,6 +8,8 @@ counted as declared: 76 Batocera entries added names such as boot0.rom. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import re import sys import unittest diff --git a/tests/test_port.py b/tests/test_port.py index 5c873e84b..afb8662c7 100644 --- a/tests/test_port.py +++ b/tests/test_port.py @@ -8,6 +8,8 @@ route of the port, and the other launchers, are in test_handheld_launchers. """ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import importlib.util import io diff --git a/tests/test_profile_checks.py b/tests/test_profile_checks.py index e4fb44c97..a7de1e04a 100644 --- a/tests/test_profile_checks.py +++ b/tests/test_profile_checks.py @@ -9,6 +9,8 @@ check left out lets through a file the emulator refuses. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import re import sys import tempfile diff --git a/tests/test_profile_names.py b/tests/test_profile_names.py index c5ec1a778..da172b185 100644 --- a/tests/test_profile_names.py +++ b/tests/test_profile_names.py @@ -7,6 +7,8 @@ own name that way. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_profile_paths.py b/tests/test_profile_paths.py index 3df44b9ce..eea16aea9 100644 --- a/tests/test_profile_paths.py +++ b/tests/test_profile_paths.py @@ -8,6 +8,8 @@ app's own code joins that folder to its data root. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import unittest from pathlib import Path diff --git a/tests/test_profile_repositories.py b/tests/test_profile_repositories.py index c00f94a83..76e63fe00 100644 --- a/tests/test_profile_repositories.py +++ b/tests/test_profile_repositories.py @@ -11,6 +11,8 @@ and skips. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_profile_sync.py b/tests/test_profile_sync.py index 95879c00a..7724ad0d8 100644 --- a/tests/test_profile_sync.py +++ b/tests/test_profile_sync.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import argparse import contextlib import io diff --git a/tests/test_prose_style.py b/tests/test_prose_style.py index d089e9f45..9081f77f4 100644 --- a/tests/test_prose_style.py +++ b/tests/test_prose_style.py @@ -8,6 +8,8 @@ not write them. This module names every place one comes back. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import io import os import re diff --git a/tests/test_provenance.py b/tests/test_provenance.py index d76d3a9b4..4dd467c74 100644 --- a/tests/test_provenance.py +++ b/tests/test_provenance.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import tempfile import unittest diff --git a/tests/test_refresh_data_dirs.py b/tests/test_refresh_data_dirs.py index b7fcd5617..604eba7ba 100644 --- a/tests/test_refresh_data_dirs.py +++ b/tests/test_refresh_data_dirs.py @@ -9,6 +9,8 @@ empty JSON document. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import io import json import sys diff --git a/tests/test_refresh_failures.py b/tests/test_refresh_failures.py index 11e2bfc27..7e2942913 100644 --- a/tests/test_refresh_failures.py +++ b/tests/test_refresh_failures.py @@ -8,6 +8,8 @@ failed, the cache left at the old version. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import os import shutil diff --git a/tests/test_refresh_stale.py b/tests/test_refresh_stale.py index e92887a66..c6916358b 100644 --- a/tests/test_refresh_stale.py +++ b/tests/test_refresh_stale.py @@ -8,6 +8,8 @@ by the refresh of the original its export patches. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import tempfile import unittest diff --git a/tests/test_region.py b/tests/test_region.py index d0611a975..208c5bdd0 100644 --- a/tests/test_region.py +++ b/tests/test_region.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import io import os diff --git a/tests/test_region_agnostic_scan.py b/tests/test_region_agnostic_scan.py index 35175f38a..f6a7eda39 100644 --- a/tests/test_region_agnostic_scan.py +++ b/tests/test_region_agnostic_scan.py @@ -9,6 +9,8 @@ ROCKNIX. Reads the repository: skips when the database is absent. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import os import sys import unittest diff --git a/tests/test_region_check.py b/tests/test_region_check.py index 83e924129..5fd073ada 100644 --- a/tests/test_region_check.py +++ b/tests/test_region_check.py @@ -3,6 +3,8 @@ records settle.""" from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_region_groups.py b/tests/test_region_groups.py index 6330b1aca..4ac1a0c66 100644 --- a/tests/test_region_groups.py +++ b/tests/test_region_groups.py @@ -7,6 +7,8 @@ Enterprise group drop the German Enterprise ROM under --region us. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_region_held.py b/tests/test_region_held.py index cb384cb44..3c50a8754 100644 --- a/tests/test_region_held.py +++ b/tests/test_region_held.py @@ -8,6 +8,8 @@ Japanese one, and the system shipped no BIOS at all. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import os import shutil diff --git a/tests/test_region_platform_index.py b/tests/test_region_platform_index.py index fbb1a59ea..12d206dd3 100644 --- a/tests/test_region_platform_index.py +++ b/tests/test_region_platform_index.py @@ -8,6 +8,8 @@ voided the [europe] tag Genesis Plus GX and PicoDrive give it, and from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_region_required_only.py b/tests/test_region_required_only.py index f361b33b7..b3a2cfdef 100644 --- a/tests/test_region_required_only.py +++ b/tests/test_region_required_only.py @@ -8,6 +8,8 @@ the optional winner: the slot shipped empty. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import ast import sys import unittest diff --git a/tests/test_release_packs.py b/tests/test_release_packs.py index a32e3a2a9..e3d54147a 100644 --- a/tests/test_release_packs.py +++ b/tests/test_release_packs.py @@ -13,6 +13,8 @@ platform has a permanent page at get// instead. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import io import json diff --git a/tests/test_required_only_archives.py b/tests/test_required_only_archives.py index c8866e41b..417d642db 100644 --- a/tests/test_required_only_archives.py +++ b/tests/test_required_only_archives.py @@ -6,6 +6,8 @@ its _Required pack held them anyway: the archive loop never read `required`. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import subprocess import sys import tempfile diff --git a/tests/test_required_only_twins.py b/tests/test_required_only_twins.py index c985096a9..cb08788fd 100644 --- a/tests/test_required_only_twins.py +++ b/tests/test_required_only_twins.py @@ -11,6 +11,8 @@ the manifest without a trace. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import sys import tempfile diff --git a/tests/test_resolution_evidence.py b/tests/test_resolution_evidence.py index 588a18be4..2d2c2c4e1 100644 --- a/tests/test_resolution_evidence.py +++ b/tests/test_resolution_evidence.py @@ -10,6 +10,8 @@ predicate is that check. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import sys import tempfile diff --git a/tests/test_retired_files.py b/tests/test_retired_files.py index b6387f1d3..fee66c0ab 100644 --- a/tests/test_retired_files.py +++ b/tests/test_retired_files.py @@ -8,6 +8,8 @@ contribution of a file the collection had held. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import sys import tempfile diff --git a/tests/test_retrodeck_scraper_errors.py b/tests/test_retrodeck_scraper_errors.py index 2ab272d9d..7d2f2b282 100644 --- a/tests/test_retrodeck_scraper_errors.py +++ b/tests/test_retrodeck_scraper_errors.py @@ -7,6 +7,8 @@ PS2 BIOS and the pcsx2 standalone core, exit code 0. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import io import json import sys diff --git a/tests/test_romfolders_card.py b/tests/test_romfolders_card.py index 2a106976e..615cd941d 100644 --- a/tests/test_romfolders_card.py +++ b/tests/test_romfolders_card.py @@ -7,6 +7,8 @@ schema and their own declared sources. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import sys import unittest diff --git a/tests/test_romfolders_es.py b/tests/test_romfolders_es.py index 828966f63..e3aa43084 100644 --- a/tests/test_romfolders_es.py +++ b/tests/test_romfolders_es.py @@ -9,6 +9,8 @@ naming a declared source, and a second dump giving the same bytes. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import sys import unittest diff --git a/tests/test_romm_hash_rule.py b/tests/test_romm_hash_rule.py index 922d83f9f..17ec065e8 100644 --- a/tests/test_romm_hash_rule.py +++ b/tests/test_romm_hash_rule.py @@ -8,6 +8,8 @@ a wrong declared size passed here and failed there. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import json import sys diff --git a/tests/test_romset_recipes.py b/tests/test_romset_recipes.py index 88c666ce2..769345f22 100644 --- a/tests/test_romset_recipes.py +++ b/tests/test_romset_recipes.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import json import sys diff --git a/tests/test_save_root.py b/tests/test_save_root.py index e0a58c5ea..67a2a42d1 100644 --- a/tests/test_save_root.py +++ b/tests/test_save_root.py @@ -11,6 +11,8 @@ directory the frontend's config names. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import functools import hashlib import http.server diff --git a/tests/test_schema_semantic_gate.py b/tests/test_schema_semantic_gate.py index 9ccc9692c..5d6fd9983 100644 --- a/tests/test_schema_semantic_gate.py +++ b/tests/test_schema_semantic_gate.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import io import json import sys diff --git a/tests/test_scraper_contract.py b/tests/test_scraper_contract.py index cf9e04c20..9615e9ebd 100644 --- a/tests/test_scraper_contract.py +++ b/tests/test_scraper_contract.py @@ -10,6 +10,8 @@ exercised is a promise to contributors backed by nothing. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import importlib import io import json diff --git a/tests/test_sega_filing.py b/tests/test_sega_filing.py index 0fd10af1e..939fe0d40 100644 --- a/tests/test_sega_filing.py +++ b/tests/test_sega_filing.py @@ -9,6 +9,8 @@ Reads the repository. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_shared_groups.py b/tests/test_shared_groups.py index 94c0219ec..f418b570b 100644 --- a/tests/test_shared_groups.py +++ b/tests/test_shared_groups.py @@ -9,6 +9,8 @@ it back as a required file of RetroArch, Lakka and RetroPie. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_shipped_content.py b/tests/test_shipped_content.py index f7beb3708..2e49ee6c8 100644 --- a/tests/test_shipped_content.py +++ b/tests/test_shipped_content.py @@ -15,6 +15,8 @@ path each entry comes from. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import json import os diff --git a/tests/test_site_arcade_boards.py b/tests/test_site_arcade_boards.py index 6f836cd8a..0f22664c4 100644 --- a/tests/test_site_arcade_boards.py +++ b/tests/test_site_arcade_boards.py @@ -11,6 +11,8 @@ link or carry their reason below. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import tempfile import unittest diff --git a/tests/test_site_availability.py b/tests/test_site_availability.py index 12fa9052c..46efd86b6 100644 --- a/tests/test_site_availability.py +++ b/tests/test_site_availability.py @@ -8,6 +8,8 @@ held across the site while the gaps page listed them as known absences. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_site_bootstrap.py b/tests/test_site_bootstrap.py index ee41e51bb..3b736cad1 100644 --- a/tests/test_site_bootstrap.py +++ b/tests/test_site_bootstrap.py @@ -9,6 +9,8 @@ that long, so each copy reads install.py from the commit it was built from. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import json import os diff --git a/tests/test_site_built_gate.py b/tests/test_site_built_gate.py index c1957ab2f..1734cf873 100644 --- a/tests/test_site_built_gate.py +++ b/tests/test_site_built_gate.py @@ -15,6 +15,8 @@ Skips when the site is not built. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import re import sys diff --git a/tests/test_site_components.py b/tests/test_site_components.py index 376724742..ee73fbb92 100644 --- a/tests/test_site_components.py +++ b/tests/test_site_components.py @@ -18,6 +18,8 @@ node and skip without it. """ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import re import shutil diff --git a/tests/test_site_console_folders.py b/tests/test_site_console_folders.py index 514667a43..9d3a895ce 100644 --- a/tests/test_site_console_folders.py +++ b/tests/test_site_console_folders.py @@ -12,6 +12,8 @@ three samples committed under "FBAlpha 2012" and four release assets under from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import re import subprocess diff --git a/tests/test_site_content_data.py b/tests/test_site_content_data.py index a9c0f2d40..e95382dc1 100644 --- a/tests/test_site_content_data.py +++ b/tests/test_site_content_data.py @@ -8,6 +8,8 @@ needs no Python change, and a mistake stops the build with its name. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import ast import re import shutil diff --git a/tests/test_site_copy.py b/tests/test_site_copy.py index 47507aa5f..5d2bb9662 100644 --- a/tests/test_site_copy.py +++ b/tests/test_site_copy.py @@ -12,6 +12,8 @@ print the measures of every page held here. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import os import re import statistics diff --git a/tests/test_site_cores.py b/tests/test_site_cores.py index 16f42673a..9bc8c3d70 100644 --- a/tests/test_site_cores.py +++ b/tests/test_site_cores.py @@ -7,6 +7,8 @@ where its pack is built from 321. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import re import sys import unittest diff --git a/tests/test_site_css.py b/tests/test_site_css.py index 99cf0132a..e9dde975b 100644 --- a/tests/test_site_css.py +++ b/tests/test_site_css.py @@ -25,6 +25,8 @@ crumb separator free to end a line alone. """ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import re import unittest from pathlib import Path diff --git a/tests/test_site_density_cards.py b/tests/test_site_density_cards.py index 6bea1ba41..c932bcc08 100644 --- a/tests/test_site_density_cards.py +++ b/tests/test_site_density_cards.py @@ -10,6 +10,8 @@ sits in closed folds, every fact still on the page. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import re import sys import types diff --git a/tests/test_site_emulator_page.py b/tests/test_site_emulator_page.py index be1165ee1..9ffcb5842 100644 --- a/tests/test_site_emulator_page.py +++ b/tests/test_site_emulator_page.py @@ -5,6 +5,8 @@ No network and no database: pages are rendered from small profiles. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_site_emulators.py b/tests/test_site_emulators.py index e8421df90..102eef7ac 100644 --- a/tests/test_site_emulators.py +++ b/tests/test_site_emulators.py @@ -27,6 +27,8 @@ Linux, Windows and Android commands, for MAME4droid an Android-only app. """ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import re import sys import unittest diff --git a/tests/test_site_entry.py b/tests/test_site_entry.py index 3806438ba..bb9acc096 100644 --- a/tests/test_site_entry.py +++ b/tests/test_site_entry.py @@ -32,6 +32,8 @@ Linux handheld rows sent the reader to a menu. """ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import re import sys diff --git a/tests/test_site_entry_tables.py b/tests/test_site_entry_tables.py index 4065bf8f6..ae4e01d0b 100644 --- a/tests/test_site_entry_tables.py +++ b/tests/test_site_entry_tables.py @@ -10,6 +10,8 @@ every name and hash back. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import re import sys import unittest diff --git a/tests/test_site_exports.py b/tests/test_site_exports.py index 4d230afc9..22fb6a020 100644 --- a/tests/test_site_exports.py +++ b/tests/test_site_exports.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import json import os diff --git a/tests/test_site_funnel.py b/tests/test_site_funnel.py index 72a96fbf6..e6b113638 100644 --- a/tests/test_site_funnel.py +++ b/tests/test_site_funnel.py @@ -7,6 +7,8 @@ reader two levels deeper without saying so. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import os import re diff --git a/tests/test_site_images.py b/tests/test_site_images.py index 21d28c0f0..ee0cb5355 100644 --- a/tests/test_site_images.py +++ b/tests/test_site_images.py @@ -8,6 +8,8 @@ CDN. These tests hold the replacements in place. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import re import sys diff --git a/tests/test_site_inputs.py b/tests/test_site_inputs.py index 57ee16fa4..031ae8b10 100644 --- a/tests/test_site_inputs.py +++ b/tests/test_site_inputs.py @@ -9,6 +9,8 @@ directory, so a get/ page said "No ZIP" for a setup the API marked as released. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import ast import json import os diff --git a/tests/test_site_insights.py b/tests/test_site_insights.py index c9f9b2af9..ac0fe71c8 100644 --- a/tests/test_site_insights.py +++ b/tests/test_site_insights.py @@ -1,6 +1,8 @@ """The readings of scripts/site_insights.py, on synthetic figures.""" from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import datetime as dt import sys import unittest diff --git a/tests/test_site_integration.py b/tests/test_site_integration.py index a3371662a..d2f58137c 100644 --- a/tests/test_site_integration.py +++ b/tests/test_site_integration.py @@ -9,6 +9,8 @@ Node's compile cache into /tmp. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import glob import json import re diff --git a/tests/test_site_nav.py b/tests/test_site_nav.py index af5731578..934c97fd4 100644 --- a/tests/test_site_nav.py +++ b/tests/test_site_nav.py @@ -21,6 +21,8 @@ are built, the pages and the site. """ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import re import struct diff --git a/tests/test_site_picker.py b/tests/test_site_picker.py index 7ff891551..d725f57df 100644 --- a/tests/test_site_picker.py +++ b/tests/test_site_picker.py @@ -9,6 +9,8 @@ list the page shows is not what the command it prints installs. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import importlib.util import json import random diff --git a/tests/test_site_platform_density.py b/tests/test_site_platform_density.py index d636261ba..92db586da 100644 --- a/tests/test_site_platform_density.py +++ b/tests/test_site_platform_density.py @@ -10,6 +10,8 @@ role of each reference named by one word that a legend defines once. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import html import re import sys diff --git a/tests/test_site_platform_hashes.py b/tests/test_site_platform_hashes.py index 7d131796b..bee30587a 100644 --- a/tests/test_site_platform_hashes.py +++ b/tests/test_site_platform_hashes.py @@ -8,6 +8,8 @@ checking a dump against the page was told the wrong hash. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from unittest import mock diff --git a/tests/test_site_privacy.py b/tests/test_site_privacy.py index 906d39ba7..9bf1e0808 100644 --- a/tests/test_site_privacy.py +++ b/tests/test_site_privacy.py @@ -6,6 +6,8 @@ page looking different. """ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import re import unittest from pathlib import Path diff --git a/tests/test_site_reference.py b/tests/test_site_reference.py index 36f130fde..e70976dd8 100644 --- a/tests/test_site_reference.py +++ b/tests/test_site_reference.py @@ -31,6 +31,8 @@ it has not been generated. """ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import csv import io import json diff --git a/tests/test_site_render.py b/tests/test_site_render.py index 9628bd5ed..09d25c7b1 100644 --- a/tests/test_site_render.py +++ b/tests/test_site_render.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import tempfile import unittest diff --git a/tests/test_site_search.py b/tests/test_site_search.py index 976d8f860..242466820 100644 --- a/tests/test_site_search.py +++ b/tests/test_site_search.py @@ -19,6 +19,8 @@ built, the site. """ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import ast import re import sys diff --git a/tests/test_site_system_links.py b/tests/test_site_system_links.py index 417ddd940..c9b132c01 100644 --- a/tests/test_site_system_links.py +++ b/tests/test_site_system_links.py @@ -11,6 +11,8 @@ Reads the repository: skips when the database is absent. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import os import sys import unittest diff --git a/tests/test_site_system_names.py b/tests/test_site_system_names.py index 2eeae53a4..170c12f9d 100644 --- a/tests/test_site_system_names.py +++ b/tests/test_site_system_names.py @@ -10,6 +10,8 @@ console folders, so the ids to name are the platforms' and the profiles'. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import sys import unittest diff --git a/tests/test_site_system_sections.py b/tests/test_site_system_sections.py index 5029e4033..8be186cd0 100644 --- a/tests/test_site_system_sections.py +++ b/tests/test_site_system_sections.py @@ -14,6 +14,8 @@ Reads the repository: skips when the database is absent. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import os import sys diff --git a/tests/test_site_systems.py b/tests/test_site_systems.py index 9f8891799..726c6371b 100644 --- a/tests/test_site_systems.py +++ b/tests/test_site_systems.py @@ -30,6 +30,8 @@ three times before the first file. """ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import re import sys import types diff --git a/tests/test_site_validation.py b/tests/test_site_validation.py index e7ec40fb4..b33ffbf7a 100644 --- a/tests/test_site_validation.py +++ b/tests/test_site_validation.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import os import re diff --git a/tests/test_site_weight.py b/tests/test_site_weight.py index 8918eba61..64ae626b0 100644 --- a/tests/test_site_weight.py +++ b/tests/test_site_weight.py @@ -9,6 +9,8 @@ is looked up by content, an emulator card's anchor sits on its row. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_site_wiki.py b/tests/test_site_wiki.py index cb0e17e7d..71efb0388 100644 --- a/tests/test_site_wiki.py +++ b/tests/test_site_wiki.py @@ -31,6 +31,8 @@ setup guides or the generator that writes the page a link opens. """ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import re import sys diff --git a/tests/test_site_write.py b/tests/test_site_write.py index d2c7342d2..e10709c1f 100644 --- a/tests/test_site_write.py +++ b/tests/test_site_write.py @@ -11,6 +11,8 @@ delete on the critical path and is why these tests exist. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import tempfile import unittest diff --git a/tests/test_slot.py b/tests/test_slot.py index 46dfd09be..65819a4ae 100644 --- a/tests/test_slot.py +++ b/tests/test_slot.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import os import sys import unittest diff --git a/tests/test_slots.py b/tests/test_slots.py index 417f91f16..1c966fad3 100644 --- a/tests/test_slots.py +++ b/tests/test_slots.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import os import re import shutil diff --git a/tests/test_slots_shipped_file.py b/tests/test_slots_shipped_file.py index c0865fb88..2b6dc03d3 100644 --- a/tests/test_slots_shipped_file.py +++ b/tests/test_slots_shipped_file.py @@ -11,6 +11,8 @@ Reads the repository: skips when the database or the files are absent. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import copy import hashlib import os diff --git a/tests/test_source_ref_targets.py b/tests/test_source_ref_targets.py index 611f0c739..5bf8eeee3 100644 --- a/tests/test_source_ref_targets.py +++ b/tests/test_source_ref_targets.py @@ -12,6 +12,8 @@ mirror pages its tree, and read as one page it could not confirm a path. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_split_extras.py b/tests/test_split_extras.py index 0f8c3c0ea..08690f001 100644 --- a/tests/test_split_extras.py +++ b/tests/test_split_extras.py @@ -7,6 +7,8 @@ and in no part (4507 of RetroArch's 5430). from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import sys import tempfile diff --git a/tests/test_split_names.py b/tests/test_split_names.py index 250579cfb..98751f575 100644 --- a/tests/test_split_names.py +++ b/tests/test_split_names.py @@ -10,6 +10,8 @@ SHA256SUMS.txt. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import os import sys import tempfile diff --git a/tests/test_split_pack.py b/tests/test_split_pack.py index 2ae04dcde..48983f8fc 100644 --- a/tests/test_split_pack.py +++ b/tests/test_split_pack.py @@ -14,6 +14,8 @@ parts extracted into one folder are the pack. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import io import os diff --git a/tests/test_standalone_links.py b/tests/test_standalone_links.py index 9d8044fcc..7ea47c50f 100644 --- a/tests/test_standalone_links.py +++ b/tests/test_standalone_links.py @@ -12,6 +12,8 @@ naomi.zip took the place of MAME's. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import textwrap import unittest diff --git a/tests/test_standalone_mode.py b/tests/test_standalone_mode.py index 5e885c2c1..82d5d22b5 100644 --- a/tests/test_standalone_mode.py +++ b/tests/test_standalone_mode.py @@ -10,6 +10,8 @@ standalone_cores dropped them from its pack. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import sys import unittest diff --git a/tests/test_standalone_probe.py b/tests/test_standalone_probe.py index 6a51f731c..c9eda2181 100644 --- a/tests/test_standalone_probe.py +++ b/tests/test_standalone_probe.py @@ -3,6 +3,8 @@ framebuffer reader, the settings it writes and the oracle it judges with.""" from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import struct import sys import tempfile diff --git a/tests/test_system_ids.py b/tests/test_system_ids.py index 1b8098c58..48736036f 100644 --- a/tests/test_system_ids.py +++ b/tests/test_system_ids.py @@ -9,6 +9,8 @@ channelf.zip and SNES DSP sets to colecovision/. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_system_pack_extras.py b/tests/test_system_pack_extras.py index 29c23c8ff..069844ee0 100644 --- a/tests/test_system_pack_extras.py +++ b/tests/test_system_pack_extras.py @@ -7,6 +7,8 @@ names, while the split packs, built per system, carried them. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_system_pack_parity.py b/tests/test_system_pack_parity.py index 4cf8edc5f..9925a4310 100644 --- a/tests/test_system_pack_parity.py +++ b/tests/test_system_pack_parity.py @@ -10,6 +10,8 @@ or trees and credited a profile's file at a path holding another profile's. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import re import shutil diff --git a/tests/test_system_selection.py b/tests/test_system_selection.py index c7016c539..514c47262 100644 --- a/tests/test_system_selection.py +++ b/tests/test_system_selection.py @@ -10,6 +10,8 @@ libretro pack. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import os import re import subprocess diff --git a/tests/test_target_names.py b/tests/test_target_names.py index 877899c08..cb08e96b2 100644 --- a/tests/test_target_names.py +++ b/tests/test_target_names.py @@ -7,6 +7,8 @@ and `--verify-packs --target nx` looked for a pack nobody had built. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import subprocess import sys import tempfile diff --git a/tests/test_target_scrapers.py b/tests/test_target_scrapers.py index 6b05e356c..4bb1b7ba6 100644 --- a/tests/test_target_scrapers.py +++ b/tests/test_target_scrapers.py @@ -8,6 +8,8 @@ packs built for it shrank without an error. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import sys import unittest diff --git a/tests/test_target_systems.py b/tests/test_target_systems.py index c4896a123..ecb7adc6c 100644 --- a/tests/test_target_systems.py +++ b/tests/test_target_systems.py @@ -9,6 +9,8 @@ builder still shipped its ROMs as ep128emu extras. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_target_verify.py b/tests/test_target_verify.py index ee42f854b..586c9c7dc 100644 --- a/tests/test_target_verify.py +++ b/tests/test_target_verify.py @@ -10,6 +10,8 @@ out of a targeted --all run, and the check refuses it as the build does. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import os import sys import contextlib diff --git a/tests/test_tool_messages.py b/tests/test_tool_messages.py index 07937e45a..7a7a61217 100644 --- a/tests/test_tool_messages.py +++ b/tests/test_tool_messages.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import io import os diff --git a/tests/test_torrentzip.py b/tests/test_torrentzip.py index e8e3e61d5..b4986f629 100644 --- a/tests/test_torrentzip.py +++ b/tests/test_torrentzip.py @@ -1,6 +1,8 @@ """Tests for the TorrentZip builder against real MAME romsets.""" from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import os import sys diff --git a/tests/test_truth_data_dir_readers.py b/tests/test_truth_data_dir_readers.py index f58978830..26818c367 100644 --- a/tests/test_truth_data_dir_readers.py +++ b/tests/test_truth_data_dir_readers.py @@ -9,6 +9,8 @@ revision, and hash_conflict did not see LRPS2's value. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import os import sys diff --git a/tests/test_truth_diff.py b/tests/test_truth_diff.py index 949be7c7d..dcce0f7b3 100644 --- a/tests/test_truth_diff.py +++ b/tests/test_truth_diff.py @@ -9,6 +9,8 @@ discrepancy that does not exist. Content decides, as everywhere else here. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import pathlib import subprocess import sys diff --git a/tests/test_truth_layout.py b/tests/test_truth_layout.py index 50a23053b..d319b42f6 100644 --- a/tests/test_truth_layout.py +++ b/tests/test_truth_layout.py @@ -8,6 +8,8 @@ out on RetroBat, EmuDeck and RetroDECK. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import os import random diff --git a/tests/test_twin_declaration_status.py b/tests/test_twin_declaration_status.py index 4540adaaa..1cbb92c67 100644 --- a/tests/test_twin_declaration_status.py +++ b/tests/test_twin_declaration_status.py @@ -9,6 +9,8 @@ refusal read first left "excluded" behind the file the second one ships. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import hashlib import io diff --git a/tests/test_twin_declarations.py b/tests/test_twin_declarations.py index 4acbddf79..9ab464d93 100644 --- a/tests/test_twin_declarations.py +++ b/tests/test_twin_declarations.py @@ -9,6 +9,8 @@ frontend hashes bios/disk.rom for xroar and finds the PC-88 ROM. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import os import sys diff --git a/tests/test_undeclared_dedup.py b/tests/test_undeclared_dedup.py index b7fa6cde5..9fc2c12bf 100644 --- a/tests/test_undeclared_dedup.py +++ b/tests/test_undeclared_dedup.py @@ -9,6 +9,8 @@ dropped from the pack. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_unplaced_extras.py b/tests/test_unplaced_extras.py index aab69f59d..cea234522 100644 --- a/tests/test_unplaced_extras.py +++ b/tests/test_unplaced_extras.py @@ -8,6 +8,8 @@ listed them neither in files nor in omitted_files. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import os import sys diff --git a/tests/test_upstream.py b/tests/test_upstream.py index 01817f52b..9132905be 100644 --- a/tests/test_upstream.py +++ b/tests/test_upstream.py @@ -2,6 +2,8 @@ from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import http.client import os diff --git a/tests/test_upstream_index.py b/tests/test_upstream_index.py index be389491d..a765dea57 100644 --- a/tests/test_upstream_index.py +++ b/tests/test_upstream_index.py @@ -8,6 +8,8 @@ and a RetroArch target pack lost LRPS2's files. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import re import sys import unittest diff --git a/tests/test_validate_pr.py b/tests/test_validate_pr.py index d122ffc66..ddb73a493 100644 --- a/tests/test_validate_pr.py +++ b/tests/test_validate_pr.py @@ -8,6 +8,8 @@ it is an untrusted-input boundary with nothing behind it. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import os import sys import tempfile diff --git a/tests/test_validate_pr_flow.py b/tests/test_validate_pr_flow.py index cab20c4b8..d76259158 100644 --- a/tests/test_validate_pr_flow.py +++ b/tests/test_validate_pr_flow.py @@ -7,6 +7,8 @@ cannot hold has to be an action the contributor can take. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import os import subprocess diff --git a/tests/test_validate_pr_hashes.py b/tests/test_validate_pr_hashes.py index 280756681..110613039 100644 --- a/tests/test_validate_pr_hashes.py +++ b/tests/test_validate_pr_hashes.py @@ -8,6 +8,8 @@ were lost the same way. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import sys import unittest from pathlib import Path diff --git a/tests/test_validated_choice.py b/tests/test_validated_choice.py index f9aba6707..58df7e6a2 100644 --- a/tests/test_validated_choice.py +++ b/tests/test_validated_choice.py @@ -8,6 +8,8 @@ across 14 destinations on six platforms. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import ast import hashlib import sys diff --git a/tests/test_validation_scope.py b/tests/test_validation_scope.py index 423f7b81b..31a313db6 100644 --- a/tests/test_validation_scope.py +++ b/tests/test_validation_scope.py @@ -8,6 +8,8 @@ test fails if either hands the index the whole profile set again. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import re import unittest from pathlib import Path diff --git a/tests/test_variant_choice.py b/tests/test_variant_choice.py index 2638e8657..48a187652 100644 --- a/tests/test_variant_choice.py +++ b/tests/test_variant_choice.py @@ -9,6 +9,8 @@ never swapped in. Both sides now read find_validated_variant. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import os import re diff --git a/tests/test_variant_identity.py b/tests/test_variant_identity.py index 1b1f99b46..1af95d7a1 100644 --- a/tests/test_variant_identity.py +++ b/tests/test_variant_identity.py @@ -9,6 +9,8 @@ database. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import re import unittest diff --git a/tests/test_verify_all_dir.py b/tests/test_verify_all_dir.py index 6e0077338..cc2b325ee 100644 --- a/tests/test_verify_all_dir.py +++ b/tests/test_verify_all_dir.py @@ -7,6 +7,8 @@ the run, and one registered only in the copy was never checked. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import json import subprocess import sys diff --git a/tests/test_verify_data_dir_notice.py b/tests/test_verify_data_dir_notice.py index b9e4a71f9..9d2b2d08d 100644 --- a/tests/test_verify_data_dir_notice.py +++ b/tests/test_verify_data_dir_notice.py @@ -9,6 +9,8 @@ verify --emulator already named its uncached trees. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import io import os diff --git a/tests/test_verify_emulator_evidence.py b/tests/test_verify_emulator_evidence.py index b8f498c37..9247d6caf 100644 --- a/tests/test_verify_emulator_evidence.py +++ b/tests/test_verify_emulator_evidence.py @@ -14,6 +14,8 @@ the other by flagging the divergence. This report agreed with neither. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import os import sys diff --git a/tests/test_verify_pack_choice.py b/tests/test_verify_pack_choice.py index 8da4070a7..96c6e2d22 100644 --- a/tests/test_verify_pack_choice.py +++ b/tests/test_verify_pack_choice.py @@ -8,6 +8,8 @@ regional one. A pack built with --source truth answered SKIP and exit 0. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import argparse import json import os diff --git a/tests/test_verify_release_asset.py b/tests/test_verify_release_asset.py index 161732f53..d4cc4ac16 100644 --- a/tests/test_verify_release_asset.py +++ b/tests/test_verify_release_asset.py @@ -11,6 +11,8 @@ counts the file missing as before. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import os import sys diff --git a/tests/test_version_basis.py b/tests/test_version_basis.py index bb0f01511..55e1bb9af 100644 --- a/tests/test_version_basis.py +++ b/tests/test_version_basis.py @@ -8,6 +8,8 @@ to a basis, and hold a pin advance to reading the version again. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import contextlib import copy import hashlib diff --git a/tests/test_which_pack.py b/tests/test_which_pack.py index 0323b4dcb..6fd282a40 100644 --- a/tests/test_which_pack.py +++ b/tests/test_which_pack.py @@ -6,6 +6,8 @@ published and carries 3916 files the RetroArch one does not. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import re import sys import unittest diff --git a/tests/test_workflow_paths.py b/tests/test_workflow_paths.py index 119013586..1181abb82 100644 --- a/tests/test_workflow_paths.py +++ b/tests/test_workflow_paths.py @@ -7,6 +7,8 @@ until some unrelated file moved. from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import ast import fnmatch import re diff --git a/tests/test_zipped_member.py b/tests/test_zipped_member.py index da0d63eee..cc369fbd0 100644 --- a/tests/test_zipped_member.py +++ b/tests/test_zipped_member.py @@ -6,6 +6,8 @@ level1.rom went out as OK where verify said "not found inside ZIP". from __future__ import annotations +import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache + import hashlib import sys import tempfile diff --git a/wiki/testing-guide.md b/wiki/testing-guide.md index a0740c830..9e32c6481 100644 --- a/wiki/testing-guide.md +++ b/wiki/testing-guide.md @@ -222,8 +222,14 @@ disambiguated by a hash suffix on purpose. output or formatting. 5. **Run the full suite.** After adding your test, run `python -m unittest - discover -s tests -t . -v` to verify nothing else broke. `-t .` imports - `tests/__init__.py`, which keeps the suite offline. + discover -s tests -t . -v` to verify nothing else broke. + +A new module starts with `import tests` right after +`from __future__ import annotations`. The package import is what keeps a run +offline, puts its scratch under `tmp/` and gives it its own installer cache, +however the module is started: `discover tests`, `python -m unittest +tests.test_e2e` or `python -m tests.test_e2e`. A test fails on any module +without it. A fix comes with a test that fails without it. Write the test first, watch it fail on the current code, then fix: a test written after the fix may never