Skip to content

Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.

tests: the bench symlink case skips where the account cannot make a symlink

LOKI1eb895178a1d
diff --git a/tests/test_bench_out_dir.py b/tests/test_bench_out_dir.py
index 5ace01f6a..aab4d0c8a 100644
--- a/tests/test_bench_out_dir.py
+++ b/tests/test_bench_out_dir.py
@@ -247,7 +247,11 @@ class BenchResultWriteTest(unittest.TestCase):
(self.folder / "result.json").write_text(earlier, encoding="utf-8")
elsewhere = self.folder / "another-result.json"
elsewhere.write_text('{"keep": "me"}', encoding="utf-8")
- os.symlink(elsewhere, self.folder / "result.json.part")
+ try:
+ os.symlink(elsewhere, self.folder / "result.json.part")
+ except (OSError, NotImplementedError) as error:
+ # Windows allows a symlink only with Developer Mode or an elevated shell.
+ self.skipTest(f"cannot make a symlink here: {error}")
self.assertIsNone(self.write({"response_ms": {"p50": 99}}))
self.assertEqual('{"keep": "me"}', elsewhere.read_text(encoding="utf-8"),
"the write followed the symlink and overwrote the file it pointed at")