From e9fc48f3f7d0a0ff1cda3581ef43e1783aa0888a Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Mon, 5 Oct 2026 22:03:11 +0200 Subject: [PATCH] tools tests: the #425 disk-room test starts its second run without a draft layer (#897 counts an existing one) --- tools/test_setup_unsloth.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/test_setup_unsloth.py b/tools/test_setup_unsloth.py index d972f176..567f4644 100644 --- a/tools/test_setup_unsloth.py +++ b/tools/test_setup_unsloth.py @@ -289,6 +289,8 @@ class Main(Base): self.assertEqual(code, 0, out) for f in d.iterdir(): # the first run "downloaded" them f.unlink() + import shutil + shutil.rmtree(self.t / "data" / "mtp", ignore_errors=True) # #897: a draft layer already there needs less room (d / (list(setup.UNSLOTH_SHARDS)[0] + ".part")).write_bytes(b"x" * 1_500_000) with mock.patch.dict(setup.MODELS[M], {"download_gb": 0.003}): # 1.5 MB still missing: no room code, out, cfg = self.main(["--context", "8192"], free=8.001)