'tox -e cover' fails to generate coverage reports

Bug #1628843 reported by Antoni Segura Puimedon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kuryr
Fix Released
High
Antoni Segura Puimedon
kuryr-libnetwork
Fix Released
Undecided
Liping Mao

Bug Description

Due to having the pypi package name kuryr-lib but the source package name kuryr.lib, testr gets the wrong package name for 'coverage run' which results in messages of

kuryr-lib was never imported

Reproduction steps:

    1. tox -e cover

Expected result:
    cover runtests: commands[1] | coverage report
    Name Stmts Miss Branch BrPart Cover
    -------------------------------------------------------------------------
    kuryr/lib/__init__.py 0 0 0 0 100%
    kuryr/lib/_i18n.py 12 1 0 0 92%
    kuryr/lib/binding/__init__.py 8 0 0 0 100%
    kuryr/lib/binding/drivers/__init__.py 0 0 0 0 100%
    kuryr/lib/binding/drivers/utils.py 52 10 20 2 78%
    kuryr/lib/binding/drivers/veth.py 59 11 10 4 75%
    kuryr/lib/config.py 14 0 0 0 100%
    kuryr/lib/constants.py 18 0 0 0 100%
    kuryr/lib/exceptions.py 11 0 0 0 100%
    kuryr/lib/opts.py 25 9 7 0 50%
    kuryr/lib/utils.py 37 0 6 0 100%
    -------------------------------------------------------------------------
    TOTAL 236 31 43 6 82%

Actual result:
    Coverage.py warning: Module kuryr-lib was never imported.
    Coverage.py warning: No data was collected.
    Coverage.py warning: Module kuryr-lib was never imported.
    Coverage.py warning: No data was collected.
    Coverage.py warning: Module kuryr-lib was never imported.
    Coverage.py warning: No data was collected.
    Coverage.py warning: Module kuryr-lib was never imported.
    Coverage.py warning: No data was collected.
    Ran 16 tests in 0.159s (-0.008s)
    PASSED (id=105)
    No data to report.
    cover runtests: commands[1] | coverage report
    Name Stmts Miss Branch BrPart Cover
    -----------------------------------------
    No data to report.
    ERROR: InvocationError: '/home/celebdor/code/github.com/openstack/kuryr/.tox/cover/bin/coverage report'

Changed in kuryr:
importance: Undecided → High
assignee: nobody → Antoni Segura Puimedon (celebdor)
status: New → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kuryr (master)

Fix proposed to branch: master
Review: https://review.openstack.org/379305

Changed in kuryr:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kuryr (master)

Reviewed: https://review.openstack.org/379305
Committed: https://git.openstack.org/cgit/openstack/kuryr/commit/?id=cae8019e44bf91ace0b594a633cd639e09a8eefe
Submitter: Jenkins
Branch: master

commit cae8019e44bf91ace0b594a633cd639e09a8eefe
Author: Antoni Segura Puimedon <email address hidden>
Date: Thu Sep 29 11:09:05 2016 +0200

    tox: fix coverage call

    We changed the pypi package name to kuryr-lib so we need to give a hint
    to testr so it knows where to find the module for coverage.

    Closes-bug: #1628843
    Change-Id: Ic1a8576a4ced2615152889b7ab742bb00a4ce565
    Signed-off-by: Antoni Segura Puimedon <email address hidden>

Changed in kuryr:
status: In Progress → Fix Released
Revision history for this message
Liping Mao (limao) wrote :

Same problem happened in kuryr-libnetwork.

Changed in kuryr-libnetwork:
assignee: nobody → Liping Mao (limao)
Changed in kuryr-libnetwork:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kuryr-libnetwork (master)

Reviewed: https://review.openstack.org/379556
Committed: https://git.openstack.org/cgit/openstack/kuryr-libnetwork/commit/?id=5485c247d487106f180dfca5a8f9caad0a8424a3
Submitter: Jenkins
Branch: master

commit 5485c247d487106f180dfca5a8f9caad0a8424a3
Author: Liping Mao <email address hidden>
Date: Thu Sep 29 23:53:27 2016 +0800

    Fix tox -e cover in kuryr-libnetwork

    Change-Id: I175a5d3d8190a278aa82b659c65de63dbf8dbdc2
    Closes-bug: #1628843

Changed in kuryr-libnetwork:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kuryr 0.2.0

This issue was fixed in the openstack/kuryr 0.2.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers