From 099ad720b41d28d58b9aecdffd73ac1dd3f303f8 Mon Sep 17 00:00:00 2001
From: FdelMazo <FdelMazo@fi.uba.ar>
Date: Fri, 25 Feb 2022 13:28:23 -0300
Subject: [PATCH] Use string interpolation for clearer test strings

---
 rocksdb/tests/test_db.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/rocksdb/tests/test_db.py b/rocksdb/tests/test_db.py
index 201bfb7..19663ad 100644
--- a/rocksdb/tests/test_db.py
+++ b/rocksdb/tests/test_db.py
@@ -497,9 +497,9 @@ class TestFixedPrefixExtractor(TestHelper):
 
     def _fill_db(self):
         for x in range(3000):
-            keyx = hex(x)[2:].zfill(5).encode('utf8') + b'.x'
-            keyy = hex(x)[2:].zfill(5).encode('utf8') + b'.y'
-            keyz = hex(x)[2:].zfill(5).encode('utf8') + b'.z'
+            keyx = b'%05x.%b' % (x, b'x')
+            keyy = b'%05x.%b' % (x, b'y')
+            keyz = b'%05x.%b' % (x, b'z')
             self.db.put(keyx, b'x')
             self.db.put(keyy, b'y')
             self.db.put(keyz, b'z')
-- 
GitLab