[med-svn] [python-pbcore] 03/12: Add patch to skip tests if the necessary scripts can't be found

Afif Elghraoui afif-guest at moszumanska.debian.org
Sun Sep 20 08:25:27 UTC 2015


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

afif-guest pushed a commit to branch master
in repository python-pbcore.

commit 6c4126aa491d48c3b859bdbadec1d1db791a9e6c
Author: Afif Elghraoui <afif at ghraoui.name>
Date:   Sat Sep 19 22:30:19 2015 -0700

    Add patch to skip tests if the necessary scripts can't be found
---
 debian/patches/series                 |  1 +
 debian/patches/skip-integration-tests | 37 +++++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
index 57f5ddc..60fcab0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 doc-theme.patch
 enable-build-time-testing.patch
+skip-integration-tests
diff --git a/debian/patches/skip-integration-tests b/debian/patches/skip-integration-tests
new file mode 100644
index 0000000..2bdd648
--- /dev/null
+++ b/debian/patches/skip-integration-tests
@@ -0,0 +1,37 @@
+Description: Check if scripts are installed and skip some tests if not
+ When running tests at build time, two tests fail (supposedly because
+ the a necessary script can't be found on the system PATH, but I added that
+ and it still didn't work at build time). This patch will skip these two
+ tests if the script cannot be found. That should skip the tests at build
+ time and run them during CI.
+Author: Afif Elghraoui <afif at ghraoui.name>
+Bug: https://github.com/PacificBiosciences/pbcore/issues/21
+Last-Update: 2015-09-19
+--- python-pbcore.orig/tests/test_pbdataset.py
++++ python-pbcore/tests/test_pbdataset.py
+@@ -3,6 +3,7 @@
+ import re
+ import logging
+ import itertools
++import subprocess
+ import tempfile
+ 
+ import numpy as np
+@@ -79,6 +80,8 @@
+             ds.externalResources[-1].indices[0].resourceId ==
+             "IdontExist.bam.pbi")
+ 
++    @unittest.skipIf(subprocess.call(["which", "pbdataset"]),
++                     "pbdataset script is not available")
+     def test_split_cli(self):
+         outdir = tempfile.mkdtemp(suffix="dataset-unittest")
+         cmd = "dataset.py split --outdir {o} --contigs --chunks 2 {d}".format(
+@@ -92,6 +95,8 @@
+         self.assertTrue(os.path.exists(
+             os.path.join(outdir, os.path.basename(data.getXml(16)))))
+ 
++    @unittest.skipIf(subprocess.call(["which", "pbdataset"]),
++                     "pbdataset script is not available")
+     def test_create_cli(self):
+         log.debug("Absolute")
+         outdir = tempfile.mkdtemp(suffix="dataset-unittest")

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



More information about the debian-med-commit mailing list