[med-svn] [Git][med-team/seqan2][master] 2 commits: fix demo_checker with python3 fixing #1026492

Olivier Sallou (@osallou) gitlab at salsa.debian.org
Wed Dec 21 14:01:16 GMT 2022



Olivier Sallou pushed to branch master at Debian Med / seqan2


Commits:
fa65c7a5 by Olivier Sallou at 2022-12-21T11:31:12+00:00
fix demo_checker with python3 fixing #1026492

- - - - -
f70545ef by Olivier Sallou at 2022-12-21T14:01:01+00:00
additional fixes

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/fix_python3_tests
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -4,6 +4,10 @@ seqan2 (2.4.0+dfsg-15) UNRELEASED; urgency=medium
   * Standards-Version: 4.6.1 (routine-update)
   * Use secure URI in Homepage field.
   * Set upstream metadata fields: Repository-Browse.
+  [Team upload]
+  * Fix tests against python3 (Closes: #1026492)
+    **pending issue** fixes all tests BUT remains mason2 tests failing
+    for complete different reason
 
  -- Andreas Tille <tille at debian.org>  Tue, 06 Dec 2022 15:52:21 +0100
 


=====================================
debian/patches/fix_python3_tests
=====================================
@@ -0,0 +1,43 @@
+--- 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:


=====================================
debian/patches/series
=====================================
@@ -9,3 +9,4 @@ fix_manpage_formatting.patch
 no-unaligned-access.patch
 ia64_yield
 python3
+fix_python3_tests



View it on GitLab: https://salsa.debian.org/med-team/seqan2/-/compare/a20ae5d36039b1062dcc04dba00d870f6e505a0e...f70545ef86b4df106700b5c9369f3cdbad3b653a

-- 
View it on GitLab: https://salsa.debian.org/med-team/seqan2/-/compare/a20ae5d36039b1062dcc04dba00d870f6e505a0e...f70545ef86b4df106700b5c9369f3cdbad3b653a
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20221221/da8c8a05/attachment-0001.htm>


More information about the debian-med-commit mailing list