[med-svn] [Git][med-team/mapdamage][master] 2 commits: Make sure test can be called also from somewhere else than mapdamage dir

Andreas Tille gitlab at salsa.debian.org
Tue Sep 3 18:21:25 BST 2019



Andreas Tille pushed to branch master at Debian Med / mapdamage


Commits:
f2d42c25 by Andreas Tille at 2019-09-03T16:36:06Z
Make sure test can be called also from somewhere else than mapdamage dir

- - - - -
92d20272 by Andreas Tille at 2019-09-03T16:45:04Z
Fix two remaining python instances

- - - - -


2 changed files:

- debian/patches/2to3.patch
- debian/tests/run-unit-test


Changes:

=====================================
debian/patches/2to3.patch
=====================================
@@ -254,11 +254,14 @@ Last-Update: Tue, 03 Sep 2019 11:02:34 +0200
          if ((nt_seq == "T" and nt_ref =="C") or (nt_seq == "A" and nt_ref =="G")):
 --- a/mapdamage/rescale_test.py
 +++ b/mapdamage/rescale_test.py
-@@ -1,6 +1,6 @@
+@@ -1,6 +1,9 @@
  import unittest
  import optparse
 -import rescale
-+from . import rescale
++try:
++    from . import rescale
++except:
++    from mapdamage import rescale
  import pysam
  import filecmp
  
@@ -406,9 +409,12 @@ Last-Update: Tue, 03 Sep 2019 11:02:34 +0200
  # -*- coding: utf-8 -*-
  
  from distutils.core import setup
-@@ -16,7 +16,7 @@ def setup_version():
+@@ -14,9 +14,9 @@ def setup_version():
+     try:
+         version = subprocess.check_output(("git", "describe", "--always", "--tags", "--dirty"))
          with open(os.path.join("mapdamage", "_version.py"), "w") as handle:
-             handle.write("#!/usr/bin/env python\n")
+-            handle.write("#!/usr/bin/env python\n")
++            handle.write("#!/usr/bin/python3\n")
              handle.write("__version__ = %r\n" % (version.strip(),))
 -    except (subprocess.CalledProcessError, OSError), error:
 +    except (subprocess.CalledProcessError, OSError) as error:


=====================================
debian/tests/run-unit-test
=====================================
@@ -12,7 +12,7 @@ cd $ADTTMP
 cp -a /usr/share/doc/${pkg}/tests/* .
 cp -a /usr/share/doc/${pkg}/ref_T.fa .
 gunzip -r *
-python rescale_test.py
+python3 rescale_test.py
 
 
 mapDamage -i rescale_test/pe_test/pe.sam -r ref_T.fa



View it on GitLab: https://salsa.debian.org/med-team/mapdamage/compare/2aa3d4df4c0dfa23f6dca110af1999f2b91c0e07...92d202724506ca4b51833fbf5eaac9603c1dc106

-- 
View it on GitLab: https://salsa.debian.org/med-team/mapdamage/compare/2aa3d4df4c0dfa23f6dca110af1999f2b91c0e07...92d202724506ca4b51833fbf5eaac9603c1dc106
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/20190903/ed31531a/attachment-0001.html>


More information about the debian-med-commit mailing list