diff --git a/tests/test_api_duplicate_safety.py b/tests/test_api_duplicate_safety.py index 8ae50edb..402b48ab 100644 --- a/tests/test_api_duplicate_safety.py +++ b/tests/test_api_duplicate_safety.py @@ -381,7 +381,7 @@ class TestAnotherMount(SafetyTestCase): self.assertTrue(other.is_file() and keeper.is_file()) async def test_a_volume_without_file_ids_is_named_truthfully(self): - keeper, other, patches = self.mount("x.png", "x.png") + self.mount("x.png", "x.png") def zero(path, *args, **kwargs): return _fake_stat(self.real_stat(path), st_dev=0, st_ino=0) diff --git a/tests/test_bulk_library_delete.py b/tests/test_bulk_library_delete.py index 2ff16997..7c1aa7b5 100644 --- a/tests/test_bulk_library_delete.py +++ b/tests/test_bulk_library_delete.py @@ -385,8 +385,8 @@ class TestArchivedReaders(LibraryDeleteCase): def setUp(self): super().setUp() - self.kept, _kn, _kp = self.paired("Kept cat", "kept blur") - self.gone, _gn, _gp = self.paired("Gone cat", "gone blur") + self.kept, _, _ = self.paired("Kept cat", "kept blur") + self.gone, _, _ = self.paired("Gone cat", "gone blur") for pid, category, tag in ((self.kept, "keep", "k"), (self.gone, "gone", "g")): self.db.update_prompt_metadata(pid, category=category, tags=[tag]) self.apply([self.gone]) diff --git a/tests/test_lora_manager_layout.py b/tests/test_lora_manager_layout.py index 8af50902..adb0f4f2 100644 --- a/tests/test_lora_manager_layout.py +++ b/tests/test_lora_manager_layout.py @@ -584,9 +584,6 @@ class CentralizedDiscoveryTests(LayoutTestCase): def test_an_unlistable_folder_raises(self): layout = self.load() - def refuse(error): - raise error - def failing_walk(top, onerror=None, followlinks=False): onerror(PermissionError(13, "denied", top)) return iter(()) diff --git a/tests/test_restore_plans.py b/tests/test_restore_plans.py index f5825169..b9be6087 100644 --- a/tests/test_restore_plans.py +++ b/tests/test_restore_plans.py @@ -357,7 +357,7 @@ class TestRestoreAdmission(RestoreTestCase): gate.set() await health.task - restore, release = self.gated_job("restore", "exclusive", RESTORE_JOB_TITLE) + self.gated_job("restore", "exclusive", RESTORE_JOB_TITLE) resp = await self.client.post("/prompt_manager/system/health") refusal = await resp.json() self.assertEqual((resp.status, refusal["code"]), (409, "busy")) @@ -369,7 +369,7 @@ class TestRestoreAdmission(RestoreTestCase): self.assertEqual(body["running"]["title"], "Move library") self.api._jobs.list()[0].finish() - body = await self.preview(self.upload(["restored"])) + await self.preview(self.upload(["restored"])) self.gated_job("restore", "exclusive", RESTORE_JOB_TITLE) resp = await self.client.post("/prompt_manager/system/library/move") self.assertEqual(resp.status, 409) diff --git a/tests/test_review_image_links_tool.py b/tests/test_review_image_links_tool.py index 0e52fdf0..9d698500 100644 --- a/tests/test_review_image_links_tool.py +++ b/tests/test_review_image_links_tool.py @@ -116,7 +116,7 @@ class ReviewToolTests(ToolFixture): self.assertEqual(code, 0) (verdict,) = json.loads(out.split("--apply, for")[0]) self.assertEqual(verdict["verdict"], "manual") - code, _out = self.run_tool("--ids", str(self.guessed[0]), "--apply") + self.run_tool("--ids", str(self.guessed[0]), "--apply") self.assertEqual(self.links(), before) def test_prompt_selection_and_text_report(self): diff --git a/tests/test_review_inspection.py b/tests/test_review_inspection.py index ea0774a1..e42bd307 100644 --- a/tests/test_review_inspection.py +++ b/tests/test_review_inspection.py @@ -337,7 +337,7 @@ class TestDefaultProfileStillDecides(InspectionTestCase): side_effect=AssertionError("inspection choices were asked"), ), ): - _item, (status, data) = await self._apply("cat") + _, (status, data) = await self._apply("cat") self.assertEqual(status, 200, data) # The saver anchor check (#390): with the file's name, nothing matches. self.assertEqual([c[1] for c in calls], ["two.png"]) @@ -383,7 +383,7 @@ class TestApplyInspectionCandidate(InspectionTestCase): return real(metadata, file_name) with patch.object(review_capture, "resolve_inspection", side_effect=spy): - _item, (status, data) = await self._apply("make it night") + _, (status, data) = await self._apply("make it night") self.assertEqual(status, 200, data) self.assertEqual(len(calls), 1) @@ -566,7 +566,7 @@ class TestVersionChanges(InspectionTestCase): self.assertNotEqual(item["resolver_version"], old["resolver_version"]) self.assertEqual(job["scope"]["review_items"], 1) self.assertEqual(self._pending(), 1) - _item, (status, data) = await self._apply("make it night") + _, (status, data) = await self._apply("make it night") self.assertEqual(status, 200, data) self.assertEqual(self._linked_text(path), "make it night") @@ -885,7 +885,7 @@ class TestInspectionResolverVersion(InspectionTestCase): await self._scan("all") (item,) = self._items() self.assertNotEqual(item["id"], old["id"]) - _item, (status, data) = await self._apply("add a red hat") + _, (status, data) = await self._apply("add a red hat") self.assertEqual(status, 200, data) self.assertEqual(self._linked_text(path), "add a red hat") diff --git a/tests/test_review_saver_anchor.py b/tests/test_review_saver_anchor.py index c61d8112..227cda50 100644 --- a/tests/test_review_saver_anchor.py +++ b/tests/test_review_saver_anchor.py @@ -169,7 +169,7 @@ class TestInspectionItemsAnchor(InspectionTestCase): path = self._write("branch_1_00001_.png", graph=branch_graph(*PROMPTS)) await self._scan() - _item, (status, data) = await self._apply("add a red hat") + _, (status, data) = await self._apply("add a red hat") self.assertEqual(status, 200, data) self.assertEqual(self._linked_text(path), "add a red hat") @@ -316,7 +316,7 @@ class TestDefaultItemsAnchor(InspectionTestCase): with patch.object(review_capture, "_captured_inspection", return_value=None): await self._scan() - _item, (status, data) = await self._apply("cat") + _, (status, data) = await self._apply("cat") self.assertEqual(status, 200, data) self.assertEqual(self._linked_text(path), "cat") diff --git a/tests/test_thumbnail_jobs.py b/tests/test_thumbnail_jobs.py index cda1832f..a74680e5 100644 --- a/tests/test_thumbnail_jobs.py +++ b/tests/test_thumbnail_jobs.py @@ -894,7 +894,7 @@ class TestLegacyStreamOnTheJob(ThumbnailJobCase): self.assertEqual(resp.status, 200) await self._wait(first) job = self.api._jobs.active("thumbnails") - _subscribed, state["left"] = self._watch_subscribers(job) + _, state["left"] = self._watch_subscribers(job) resp.close() # the gallery tab went away closed.set() await self._wait(state["left"]) # the server saw the client go