From 85f49c431086f8f10aa7e6dc7fb230b7fd9ecea8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 15 Jul 2024 08:52:21 +0530 Subject: [PATCH] ... --- kitty_tests/graphics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kitty_tests/graphics.py b/kitty_tests/graphics.py index 0ec39855f..2101b0af1 100644 --- a/kitty_tests/graphics.py +++ b/kitty_tests/graphics.py @@ -255,11 +255,11 @@ class TestGraphics(BaseTest): self.assertEqual(sz, dc.size_on_disk()) self.assertEqual(sz, dc.size_on_disk()) # fill holes largest first to ensure small one doesnt go into large accidentally causing fragmentation - for x in reversed(('xy', 'C'*4, 'B'*6, 'A'*8)): + for x in sorted(('xy', 'C'*4, 'B'*6, 'A'*8), key=len, reverse=True): add(x, x) self.assertTrue(dc.wait_for_write()) - self.assertEqual(sz, dc.size_on_disk()) check_data() + self.assertEqual(sz, dc.size_on_disk(), f'Disk cache has unexpectedly grown from {sz} to {dc.size_on_disk} with data: {x!r}') check_data() dc.clear() st = time.monotonic()