From a49bb8c5f93aec0ce8588d63b69e067283d57175 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 15 Jul 2024 09:24:19 +0530 Subject: [PATCH] DRYer --- kitty_tests/graphics.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kitty_tests/graphics.py b/kitty_tests/graphics.py index ceb1e4af4..cbfce8ae1 100644 --- a/kitty_tests/graphics.py +++ b/kitty_tests/graphics.py @@ -260,7 +260,8 @@ class TestGraphics(BaseTest): self.assertEqual(holes, {x[1] for x in dc.holes()}) 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 sorted(('xy', 'C'*4, 'B'*6, 'A'*8), key=len, reverse=True): + for i, x in enumerate(sorted(holes, reverse=True)): + x = 'ABCDEFGH'[i] * x add(x, x) self.assertTrue(dc.wait_for_write()) check_data()