Bug 1251707 - Build fails on selftest.py (test_coverage_plugin.TestCoveragePlugin)
Build fails on selftest.py (test_coverage_plugin.TestCoveragePlugin)
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: python-nose (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Luke Macken
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-08 20:26 EDT by Leonard den Ottolander
Modified: 2016-09-19 22:47 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-26 10:43:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Disable test_coverage_plugin.TestCoveragePlugin test (665 bytes, patch)
2015-08-08 20:26 EDT, Leonard den Ottolander
no flags Details | Diff
Diff of test_coverage_plugin.py between 1.3.4 and 1.3.7 (964 bytes, patch)
2015-08-11 08:16 EDT, Leonard den Ottolander
no flags Details | Diff
Diff of test_coverage_plugin.py between 1.3.4 and 1.3.7 (corrected) (797 bytes, patch)
2015-08-11 08:25 EDT, Leonard den Ottolander
no flags Details | Diff

  None (edit)
Description Leonard den Ottolander 2015-08-08 20:26:55 EDT
Created attachment 1060675 [details]
Disable test_coverage_plugin.TestCoveragePlugin test

Description of problem:

Build fails on selftest.


Version-Release number of selected component (if applicable):

python-nose-1.3.4-1 (FC22)


How reproducible:

$ rpmbuild -ba python-nose.spec


Actual results:

Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.cQk4WC
+ umask 022
+ cd /home/leonard/rpmbuild/BUILD
+ cd nose-1.3.4
+ /usr/bin/python selftest.py
..............................................nose.plugins.cover: ERROR: TOTAL Coverage did not reach minimum required: 100%
.nose.plugins.cover: ERROR: TOTAL Coverage did not reach minimum required: 100%
.nose.plugins.cover: ERROR: TOTAL Coverage did not reach minimum required: 100%
.nose.plugins.cover: ERROR: TOTAL Coverage did not reach minimum required: 100%
.Coverage.py warning: Module moo was previously imported, but not measured.
nose.plugins.cover: ERROR: TOTAL Coverage did not reach minimum required: 100%
.F....................................................................................S...S...........................................................................................................................................................................................................................SS......................
======================================================================
FAIL: runTest (test_coverage_plugin.TestCoveragePlugin)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/leonard/rpmbuild/BUILD/nose-1.3.4/functional_tests/test_coverage_plugin.py", line 43, in runTest
    self.assertTrue("blah        4      3    25%   1" in self.output)
AssertionError: False is not true
-------------------- >> begin captured stdout << ---------------------
hi

--------------------- >> end captured stdout << ----------------------

----------------------------------------------------------------------
Ran 384 tests in 20.747s

FAILED (SKIP=4, failures=1)
error: Bad exit status from /var/tmp/rpm-tmp.cQk4WC (%check)


RPM build errors:
    bogus date in %changelog: Fri Jun 20 2007 Luke Macken <lmacken@redhat.com> 0.10.0-0.1.a2
    Bad exit status from /var/tmp/rpm-tmp.cQk4WC (%check)


Expected results:

Successful build.


Additional info:

Looks very much like https://github.com/nose-devs/nose/issues/580 

I don't see the "SystemExit not raised" errors only the final failure on test_coverage_plugin.TestCoveragePlugin.

Patching out that one particular test makes the build succeed both on Fedora-22 and CentOS-6.
Comment 1 Kevin Fenzi 2015-08-08 23:22:24 EDT
Not seeing this with the current rpm... 

https://kojipkgs.fedoraproject.org//packages/python-nose/1.3.7/4.fc22/data/logs/noarch/build.log

Ran 387 tests in 47.372s
OK (SKIP=9)

Try the 1.3.7 rpm?
Comment 2 Leonard den Ottolander 2015-08-11 08:14:18 EDT
Build of python-nose-1.3.7-4.fc23.src.rpm on FC22 succeeds.

The test that fails for 1.3.4 has been updated to distinguish between coverage < 4.0 and >= 4.0.

I will attach the patch of test_coverage_plugin.py between 1.3.4 and 1.3.7 as applying it should fix this issue for 1.3.4.
Comment 3 Leonard den Ottolander 2015-08-11 08:16:44 EDT
Created attachment 1061475 [details]
Diff of test_coverage_plugin.py between 1.3.4 and 1.3.7

This is the full diff of test_coverage_plugin.py between 1.3.4 and 1.3.7. Only change is a conditional test depending on the version of Coverage used.
Comment 4 Leonard den Ottolander 2015-08-11 08:25:08 EDT
Created attachment 1061477 [details]
Diff of test_coverage_plugin.py between 1.3.4 and 1.3.7 (corrected)

Correction.

Diffing against the original 1.3.4 test_coverage_plugin.py, not the one containing my previous patch. Sorry for the clutter.
Comment 5 Kevin Fenzi 2015-08-17 14:49:43 EDT
Is there some reason we want to correct the 1.3.4 package? We don't really have much way to do that since we have already pushed 1.3.7 out as an update...
Comment 6 Ralph Bean 2015-08-26 10:43:06 EDT
Unless I'm reading this wrong, there's nothing we can do here.  The latest update should fix this bug.

Note You need to log in before you can comment on or make changes to this bug.