From 638a4b19eeb9aa397eb572458fc8a7b3180cb212 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 15 Jul 2024 09:19:13 +0530 Subject: [PATCH] ... --- kitty_tests/graphics.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kitty_tests/graphics.py b/kitty_tests/graphics.py index 6f956fe58..ceb1e4af4 100644 --- a/kitty_tests/graphics.py +++ b/kitty_tests/graphics.py @@ -248,14 +248,17 @@ class TestGraphics(BaseTest): check_data() sz = dc.size_on_disk() self.assertEqual(sz, sum(map(len, data.values()))) + self.assertFalse(dc.holes()) + holes = set() for x in (2, 4, 6, 8): remove(x) + holes.add(x) check_data() self.assertRaises(KeyError, dc.get, key_as_bytes(x)) + self.assertTrue(dc.wait_for_write()) self.assertEqual(sz, dc.size_on_disk()) + self.assertEqual(holes, {x[1] for x in dc.holes()}) self.assertEqual(sz, dc.size_on_disk()) - holes = {2, 4, 6, 8} - self.assertEqual(holes, {x[1] for x in dc.holes()}) # fill holes largest first to ensure small one doesnt go into large accidentally causing fragmentation for x in sorted(('xy', 'C'*4, 'B'*6, 'A'*8), key=len, reverse=True): add(x, x)