[Tarantool-patches] [PATCH v1 2/4] test: fix xlog-py/big_lsn.test.py

sergeyb at tarantool.org sergeyb at tarantool.org
Wed Jan 13 11:48:32 MSK 2021


From: Sergey Bronnikov <estetus at gmail.com>

Set correct encoding on opening file.

Part of #5538
---
 test/xlog-py/big_lsn.test.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/xlog-py/big_lsn.test.py b/test/xlog-py/big_lsn.test.py
index edc1e5620..73dcf7a48 100644
--- a/test/xlog-py/big_lsn.test.py
+++ b/test/xlog-py/big_lsn.test.py
@@ -1,4 +1,5 @@
 import os
+import codecs
 
 #
 # Check that Tarantool handles huge LSNs well (gh-4033).
@@ -17,7 +18,7 @@ new_lsn = 123456789123
 wal_dir = os.path.join(server.vardir, server.name)
 old_wal = os.path.join(wal_dir, "%020d.xlog" % old_lsn)
 new_wal = os.path.join(wal_dir, "%020d.xlog" % new_lsn)
-with open(old_wal, "r+") as f:
+with codecs.open(old_wal, "r+", encoding = "ISO-8859-1") as f:
     s = f.read()
     s = s.replace("VClock: {{1: {}}}".format(old_lsn),
                   "VClock: {{1: {}}}".format(new_lsn))
-- 
2.25.1



More information about the Tarantool-patches mailing list