1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
Author: Olivier Sallou <osallou@debian.org>
Forwarded: no
Description: fix some string comparisons made
for py2. In py3 we read bytes, not str, so
decode bytes to str before comparison.
Remove mason2 tests as upstream skip them
if gcc > 10 (in develop branch)
Last-Updated: 2022-12-21
--- a/util/bin/demo_checker.py
+++ b/util/bin/demo_checker.py
@@ -53,21 +53,21 @@
def loadExpected(args):
"""Load the expected file contents."""
- out, err = '', ''
+ out, err = b'', b''
if args.stdout_path:
with open(args.stdout_path, 'rb') as f:
out = f.read()
if args.stderr_path:
with open(args.stderr_path, 'rb') as f:
err = f.read()
- return t(out.strip()).split('\n'), t(err.strip()).split('\n')
+ return t(out.decode('utf8').strip()).split('\n'), t(err.decode('utf8').strip()).split('\n')
def runDemo(args):
cmd = [args.binary_path]
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdoutbuff, stderrbuff = p.communicate()
- return t(stdoutbuff.strip()).split('\n'), t(stderrbuff.strip()).split('\n'), p.returncode
+ return t(stdoutbuff.decode('utf8').strip()).split('\n'), t(stderrbuff.decode('utf8').strip()).split('\n'), p.returncode
def main():
--- a/util/py_lib/seqan/app_tests.py
+++ b/util/py_lib/seqan/app_tests.py
@@ -332,11 +332,11 @@
result = False
else:
with open(expected_path, 'rb') as f:
- expected_str = f.read()
+ expected_str = f.read().decode('utf8')
for t in transforms:
expected_str = t.apply(expected_str, True)
with open(result_path, 'rb') as f:
- result_str = f.read()
+ result_str = f.read().decode('utf8')
for t in transforms:
result_str = t.apply(result_str, False)
if expected_str == result_str:
--- a/apps/mason2/CMakeLists.txt
+++ b/apps/mason2/CMakeLists.txt
@@ -164,7 +164,7 @@
# App Test
# ----------------------------------------------------------------------------
-seqan_add_app_test (mason2)
+#seqan_add_app_test (mason2)
# ----------------------------------------------------------------------------
# CPack Install
|