Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8175197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:41:36+00:00 2026-06-06T22:41:36+00:00

When I test https://bitbucket.org/petar/beam_integrals with python setup.py nosetests I get a 96% coverage :

  • 0

When I test https://bitbucket.org/petar/beam_integrals with python setup.py nosetests I get a 96% coverage:

----------------------------------------------------------------------
XML: nosetests.xml
Name                                             Stmts   Miss  Cover   Missing
------------------------------------------------------------------------------
beam_integrals                                       7      7     0%   1-24
beam_integrals.beam_types                           79      0   100%
beam_integrals.characteristic_equation_solvers      65      0   100%
beam_integrals.exceptions                            6      0   100%
beam_integrals.utils                                14      0   100%
------------------------------------------------------------------------------
TOTAL                                              171      7    96%
----------------------------------------------------------------------
Ran 634 tests in 178.245s

OK (SKIP=3)

However if I test the same code with nosetests I get full coverage:

----------------------------------------------------------------------
XML: nosetests.xml
Name                                             Stmts   Miss  Cover   Missing
------------------------------------------------------------------------------
beam_integrals                                       7      0   100%
beam_integrals.beam_types                           79      0   100%
beam_integrals.characteristic_equation_solvers      65      0   100%
beam_integrals.exceptions                            6      0   100%
beam_integrals.utils                                14      0   100%
------------------------------------------------------------------------------
TOTAL                                              171      0   100%
----------------------------------------------------------------------
Ran 634 tests in 179.226s

OK (SKIP=3)

It seems python setup.py nosetests isn’t properly reporting test coverage of the beam_integrals module.

This issue has been verified on:

  1. our continuous integration server running Ubuntu 10.04 Server 32bit
  2. a freshly created Rackspace Cloud Server running Ubuntu 12.04 Server 64bit with the following setup:

    $ sudo aptitude update
    $ sudo aptitude upgrade
    $ sudo reboot
    
    $ sudo aptitude install python-pip mercurial git-core python-gmpy python-dev
    $ hg clone https://bitbucket.org/petar/beam_integrals
    $ sudo pip install -r beam_integrals/requirements.txt
    $ sudo pip install -r beam_integrals/requirements-test.txt
    
    $ cd beam_integrals
    $ python setup.py nosetests
    $ nosetests
    
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T22:41:38+00:00Added an answer on June 6, 2026 at 10:41 pm

    python setup.py nosetests is importing beam_integrals before starting coverage testing, so it’s already been imported when coverage measurement is happening. This is because your setup.py imports beam_integrals directly. This isn’t a bad thing to do, lots of Python projects do this to get version information from the code itself rather than duplicating it in the setup.py.

    When you use nosetests, it knows to begin the coverage measurement before importing anything. Actually, it probably imports things, unimports them, starts coverage, then runs the code, which imports things again.

    I’m not sure what you can do about this, other than to use nosetests to run your tests.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently test my CodeIgniter app with phpunit by using CIUnit (https://bitbucket.org/kenjis/my-ciunit). The problem
I have a url which looks like this https://test.high.com/people/11111111-name-firstname-_custa/deals/new Now i need to match
I have the xml code: <feed xml:base=https://test.net/ xmlns:d=http://schemas.microsoft.com/ado/2007/08/dataservices xmlns:m=http://schemas.microsoft.com/ado/2007/08/dataservices/metadata xmlns=http://www.w3.org/2005/Atom> <title type=text>CustomTable5</title> <id>https://eqmetest.table.core.windows.net/CustomTable5</id> <updated>2011-11-15T11:36:32Z</updated>
Please consider the following URLs: http://www.mydomain.com/a/test.php https://www.mydomain.org/a/b/test.php http://www.mydomain.co.nr/a/b/c/test.php https://www.mydomain.com/a/b/c/d/test.php http://www.mydomain.co.uk/a/b/c/d/e/test.php https://www.mydomain.co.au.nm/a/b/c/d/e/f/test.php?var1=test1&var2=test2 Now I want
I tried to use the ZipKit framework ( http://bitbucket.org/kolpanic/zipkit/wiki/UsingZipKit ) in the test application
Have url of webservice, kinda: https://test.com/abc Open in web browser:, getting error: <?xml version=1.0
Here is my test page (dont mind the layout right now) https://www.bcidaho.com/test_kalyani/employer-plans-test.asp i found
I use this library: https://github.com/robbiehanson/CocoaAsyncSocket My test code: #import <UIKit/UIKit.h> @class GCDAsyncUdpSocket; @interface ThirdViewController
I try to use assignment_tag from django docs: https://docs.djangoproject.com/en/1.4/howto/custom-template-tags/#howto-custom-template-tags-simple-tags Test project: mysite/ manage.py polls/
check out the following test: http://binks.knobbits.org/webgl/texture3.html It's a simple test of cube textures. It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.