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


Groups > linux.debian.maint.python > #9819 > unrolled thread

How to switch python-pysam package from nosetest to pytest

Started byAndreas Tille <andreas@an3as.eu>
First post2017-09-18 23:00 +0200
Last post2017-09-20 11:30 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.debian.maint.python


Contents

  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

#9819 — How to switch python-pysam package from nosetest to pytest

FromAndreas Tille <andreas@an3as.eu>
Date2017-09-18 23:00 +0200
SubjectHow to switch python-pysam package from nosetest to pytest
Message-ID<urbj4-32d-19@gated-at.bofh.it>
Hi,

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?

Kind regards

      Andreas.


[1] https://github.com/pysam-developers/pysam/issues/541
[2] https://anonscm.debian.org/git/debian-med/python-pysam.git

-- 
http://fam-tille.de

[toc] | [next] | [standalone]


#9820

FromMattia Rizzolo <mattia@debian.org>
Date2017-09-18 23:20 +0200
Message-ID<urbCq-3rH-17@gated-at.bofh.it>
In reply to#9819

[Multipart message — attachments visible in raw view] — view raw

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.

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
more about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-

[toc] | [prev] | [next] | [standalone]


#9822

FromAndreas Tille <andreas@an3as.eu>
Date2017-09-19 21:50 +0200
Message-ID<urwGR-1aF-1@gated-at.bofh.it>
In reply to#9820
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

[toc] | [prev] | [next] | [standalone]


#9823

FromPiotr Ożarowski <piotr@debian.org>
Date2017-09-20 11:30 +0200
Message-ID<urJuq-15w-27@gated-at.bofh.it>
In reply to#9822
[Andreas Tille, 2017-09-19]
> Seems I'm not lucky here.  I tried the following patch:

the patch doesn't show changes in debian/control, did you replace nose
with pytest there?
-- 
GPG: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web