diff --git a/tests/test_audit_regressions.py b/tests/test_audit_regressions.py index 3ce3b2704..09e5010de 100644 --- a/tests/test_audit_regressions.py +++ b/tests/test_audit_regressions.py @@ -965,7 +965,7 @@ class AutoFetchReadsListsAndPlacesWithoutClobbering(unittest.TestCase): """'ds' is in '3DS': the DS firmware went to Nintendo/3DS.""" from scripts.acquire import fetch as acquire_fetch - with tempfile.TemporaryDirectory(dir=TMP_ROOT) as directory: + with tempfile.TemporaryDirectory() as directory: bios = Path(directory) for folder in ("Nintendo/3DS", "Nintendo/Nintendo DS"): (bios / folder).mkdir(parents=True) @@ -982,7 +982,7 @@ class AutoFetchReadsListsAndPlacesWithoutClobbering(unittest.TestCase): from scripts.acquire import fetch as acquire_fetch - with tempfile.TemporaryDirectory(dir=TMP_ROOT) as directory: + with tempfile.TemporaryDirectory() as directory: bios, acquired = Path(directory, "bios"), Path(directory, "acquire") bios.mkdir() with mock.patch.object(acquire_fetch, "ACQUIRE_DIR", acquired), \ diff --git a/tests/test_install.py b/tests/test_install.py index 9318d6b0d..9e6a24ffe 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -568,7 +568,7 @@ class AMissingDestIsSaid(unittest.TestCase): def test_only_y_or_yes_creates_the_folders(self): # A default-no question read "yeah" as yes, as no other one does. - root = Path(_tempdir(self)) + root = scratch_dir(self) self.assertEqual(self._call(root / "a" / "b", True, "yeah")[1], 2) self.assertFalse((root / "a").exists()) diff --git a/tests/test_romset_recipes.py b/tests/test_romset_recipes.py index 6a3feac03..c9db5ed5e 100644 --- a/tests/test_romset_recipes.py +++ b/tests/test_romset_recipes.py @@ -158,7 +158,7 @@ class AVariantCopyIsAnArchive(unittest.TestCase): container = f"{zlib.crc32(copy.read_bytes()):08x}" db = {"files": {"s": {"path": str(copy), "crc32": container}}} pool = AtomPool(bios, db=db) - self.assertEqual(pool.read(_crc(ROM_A)), ROM_A) + self.assertEqual(pool.read(loopback.crc(ROM_A)), ROM_A) self.assertNotIn(container, pool) diff --git a/tests/test_scraper_network.py b/tests/test_scraper_network.py index 29259135a..bab0c40cb 100644 --- a/tests/test_scraper_network.py +++ b/tests/test_scraper_network.py @@ -134,7 +134,7 @@ class SourceRevisionReadsEveryShape(unittest.TestCase): them so, the scrapers' required_revision did not.""" url = "https://raw.githubusercontent.com/ROCKNIX/distribution/20250101/f" self.assertEqual(required_revision(url, "rocknix/distribution"), "20250101") - with tempfile.TemporaryDirectory(dir=TMP_ROOT) as tmp: + with tempfile.TemporaryDirectory() as tmp: path = Path(tmp, "p.yml") path.write_text(f"source: {url}\n") self.assertEqual(scraped_revision(path, "rocknix/Distribution"), "20250101")