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 8941177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:14:26+00:00 2026-06-15T11:14:26+00:00

I installed plugin for pytest from here: http://pypi.python.org/pypi/pytest-cov . Then I have a simple

  • 0

I installed plugin for pytest from here:http://pypi.python.org/pypi/pytest-cov. Then I have a simple test code:

pytest.py:

class TestNumbers:
    def test_int_float(self):
        assert 1 == 1.0

    def test_int_str(self):
        assert 1 == 1

I tried to test it with command: py.test --cov-report term --cov pytest.py. But it doesn’t work. Even if I gave the entire absolute path of pytest.py it was still no data for collecting. However if I use py.test pytest.py, surely it tested Ok.

I am very confusing about this problem, thanks for help.

  • 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-15T11:14:28+00:00Added an answer on June 15, 2026 at 11:14 am

    Try:

    py.test --cov-report term --cov=. test.py
    

    The --cov parameter takes an argument saying which paths to cover. In your example, --cov would consume test.py, but then there were no arguments left for py.test about which files to test.

    UPDATE: as @hpk42 points out, you need to call your example something other than pytest.py. When I did this locally, I called it test.py instead.

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

Sidebar

Related Questions

I have installed Plugin Development Environment on my Eclipse 3.8 via http://download.eclipse.org/releases/juno update site.
I have a following problems with eclipse, when I installed ClearCase plugin from this
I have installed ibrowser plugin. Do every thing in here and here Addin javascript
I installed the plugin for python and it detects the python code, but how
I installed pdfcatalog plugin from http://www.magazento.com/english/magento-ext/magazento-extensions/free-pdf-export in magento. It generates pdf of product detail
i use Symfony 1.4 and Doctrine 1.2. I installed plugin http://www.symfony-project.org/plugins/sfCkPlugin if i add
I installed this plugin (http://wordpress.org/extend/plugins/advanced-responsive-video-embedder/screenshots/) to make the size of the vídeos on my
I installed this plugin: http://wordpress.org/extend/plugins/easing-slider/installation/ I managed to install and configure it. I can
I have installed Jira and the subversion plugin (with success from what i can
I have installed NSIS plugin in my eclipse. I have followed the steps from

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.