[med-svn] [khmer] 06/06: fix fatal pytest.skip usage

Michael Crusoe misterc-guest at moszumanska.debian.org
Mon Feb 20 13:11:03 UTC 2017


This is an automated email from the git hooks/post-receive script.

misterc-guest pushed a commit to branch experimental-2.1
in repository khmer.

commit d2f640fa930fc072b2fcd0693ee8b4e5065c056d
Author: Michael R. Crusoe <michael.crusoe at gmail.com>
Date:   Mon Feb 20 02:39:25 2017 -0800

    fix fatal pytest.skip usage
---
 debian/copyright          |  2 +-
 debian/patches/amend-skip | 35 +++++++++++++++++++++++++++++++++++
 debian/patches/series     |  1 +
 3 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/debian/copyright b/debian/copyright
index dbe494c..7520a89 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,4 +1,4 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: the khmer project
 Upstream-Contact: khmer-project at idyll.org
 Source: https://pypi.python.org/pypi/khmer#downloads
diff --git a/debian/patches/amend-skip b/debian/patches/amend-skip
new file mode 100644
index 0000000..8264ee7
--- /dev/null
+++ b/debian/patches/amend-skip
@@ -0,0 +1,35 @@
+From: Michael R. Crusoe <michael.crusoe at gmail.com>
+Subject: Fix fatal pytest.skip usage
+--- khmer.orig/tests/test_sandbox_scripts.py
++++ khmer/tests/test_sandbox_scripts.py
+@@ -61,11 +61,12 @@
+ def teardown():
+     utils.cleanup()
+ 
+-
++ at pytest.mark.skipif(not os.path.exists(os.path.join(os.path.dirname(__file__),
++    "../sandbox")))
+ def _sandbox_scripts():
+     sandbox_path = os.path.join(os.path.dirname(__file__), "../sandbox")
+-    if not os.path.exists(sandbox_path):
+-        pytest.skip("sandbox scripts are only tested in a repository")
++    #if not os.path.exists(sandbox_path):
++    #    pytest.skip("sandbox scripts are only tested in a repository")
+ 
+     path = os.path.join(sandbox_path, "*.py")
+     return [os.path.normpath(s) for s in glob.glob(path)]
+--- khmer.orig/tests/khmer_tst_utils.py
++++ khmer/tests/khmer_tst_utils.py
+@@ -186,9 +186,9 @@
+             status = _runscript(scriptname, sandbox=sandbox)
+         except SystemExit as err:
+             status = err.code
+-        except:  # pylint: disable=bare-except
+-            traceback.print_exc(file=sys.stderr)
+-            status = -1
++        #except:  # pylint: disable=bare-except
++        #    traceback.print_exc(file=sys.stderr)
++        #    status = -1
+     finally:
+         sys.argv = oldargs
+         out, err = sys.stdout.getvalue(), sys.stderr.getvalue()
diff --git a/debian/patches/series b/debian/patches/series
index 8112bd4..41a86bc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ get_version
 install-prefix
 cpython-bug-empty-exceptions
 #silence-mt-bug
+amend-skip

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/khmer.git



More information about the debian-med-commit mailing list