Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #9822

Re: How to switch python-pysam package from nosetest to pytest

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Andreas Tille <andreas@an3as.eu>
Newsgroups linux.debian.maint.python
Subject Re: How to switch python-pysam package from nosetest to pytest
Date Tue, 19 Sep 2017 21:50:01 +0200
Message-ID <urwGR-1aF-1@gated-at.bofh.it> (permalink)
References <urbj4-32d-19@gated-at.bofh.it> <urbCq-3rH-17@gated-at.bofh.it>
X-Mailbox-Line From debian-python-request@lists.debian.org Tue Sep 19 19:43:05 2017
Old-Return-Path <andreas@an3as.eu>
X-Amavis-Spam-Status No, score=-6.981 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, LDO_WHITELIST=-5, MURPHY_DRUGS_REL8=0.02, RP_MATCHES_RCVD=-0.001] autolearn=ham autolearn_force=no
X-Policyd-Weight using cached result; rate: -6.1
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent NeoMutt/20170113 (1.7.2)
X-Mailing-List <debian-python@lists.debian.org> archive/latest/15204
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/20170919194247.pljowwdf2dd7g3gz@an3as.eu
Approved robomod@news.nic.it
Lines 81
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Tue, 19 Sep 2017 21:42:47 +0200
X-Original-Message-ID <20170919194247.pljowwdf2dd7g3gz@an3as.eu>
X-Original-References <20170918205440.dlrdno6bnfo3nh4m@an3as.eu> <20170918211841.yw2mt7er63v3ni2c@mapreri.org>
Xref csiph.com linux.debian.maint.python:9822

Show key headers only | View raw


On Mon, Sep 18, 2017 at 11:18:43PM +0200, Mattia Rizzolo wrote:
> On Mon, Sep 18, 2017 at 10:54:40PM +0200, Andreas Tille wrote:
> > in a Github issue[1] upstream told suggested to move from nosetest
> > to pytest for python-pysam[2] package.  Any hint how to approach
> > this?
> 
> You are asking for it in d/rules:
>     export PYBUILD_TEST_NOSE=1
> (plus some related lines after).
> 
> I think you should try and see whether pybuild's autodetection works
> fine, as it usually does.

Seems I'm not lucky here.  I tried the following patch:


diff --git a/debian/changelog b/debian/changelog
index 9d290ad..cbeba9d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ python-pysam (0.12.0.1+ds-1) UNRELEASED; urgency=medium
   * Standards-Version: 4.1.0 (no changes needed)
   * Apply upstream patch to fix test suite
     Closes: #871083, #834856
+  * Do not use nosetest
 
   [ Afif Elghraoui ]
   * New upstream version
diff --git a/debian/rules b/debian/rules
index d062880..39aeb3f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,17 +15,6 @@ HTSLIBDIR  := /usr/lib/$(DEB_HOST_MULTIARCH)
 export HTSLIB_LIBRARY_DIR=$(HTSLIBDIR)
 export HTSLIB_INCLUDE_DIR=/usr/include
 
-export PYBUILD_TEST_NOSE=1
-# pybuild calls nosetests as `python{version} -m nose tests`
-#
-# The "tests" argument (passed by pybuild as shown above) fails,
-# so don't pass anything:
-export PYBUILD_TEST_ARGS=
-# This is how we pass parameters to nose without command-line flags
-export NOSE_WHERE=$(CURDIR)/tests
-export NOSE_VERBOSE=2
-export NOSE_NOCAPTURE=1
-
 # DEB_BUILD_OPTIONS := nocheck
 
 clean: clean-tests


simply droping all references to nose.

Unfortunately it seems nose seems to be used anyway:

...
dh_auto_test
I: pybuild base:184: cd /build/python-pysam-0.12.0.1+ds/.pybuild/pythonX.Y_2.7/build; python2.7 -m nose tests
...............................................................................................................................................................................................
[E::hts_open_format] Failed to open file exdoesntexist.sam
[E::hts_open_format] Failed to open file exdoesntexist.bam
[E::hts_open_format] Failed to open file exdoesntexist.sam
...


Even worse the now removed variables make the tests fail badly.

Any hint how to realy force pytest instead of relying on autodetection?

BTW, I'm also fine with nosetest.  I simply was hoping for better
error output for the Segmentation fault issue[1].

Kind regards

       Andreas.

[1] https://github.com/pysam-developers/pysam/issues/542

-- 
http://fam-tille.de

Back to linux.debian.maint.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How to switch python-pysam package from nosetest to pytest Andreas Tille <andreas@an3as.eu> - 2017-09-18 23:00 +0200
  Re: How to switch python-pysam package from nosetest to pytest Mattia Rizzolo <mattia@debian.org> - 2017-09-18 23:20 +0200
    Re: How to switch python-pysam package from nosetest to pytest Andreas Tille <andreas@an3as.eu> - 2017-09-19 21:50 +0200
      Re: How to switch python-pysam package from nosetest to pytest Piotr Ożarowski <piotr@debian.org> - 2017-09-20 11:30 +0200

csiph-web