From ac13ae727f8c7a65a2f7e3ed700dba0f52a0e354 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 3 Jan 2021 21:05:08 +0530 Subject: [PATCH] Fix failing test We cant know what the size of the disk cache file is, since defragmentation occurs asynchronously --- kitty_tests/graphics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty_tests/graphics.py b/kitty_tests/graphics.py index e6af02b11..6560f8df7 100644 --- a/kitty_tests/graphics.py +++ b/kitty_tests/graphics.py @@ -216,10 +216,10 @@ class TestGraphics(BaseTest): while dc.total_size > before // 3: key = random.choice(tuple(data)) self.assertTrue(remove(key)) + check_data() add('trigger defrag', 'XXX') dc.wait_for_write() self.assertLess(dc.size_on_disk(), before) - self.assertEqual(dc.size_on_disk(), sum(map(len, data.values()))) check_data() def test_load_images(self):