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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:59:25+00:00 2026-06-04T22:59:25+00:00

I am trying to run py.test on my package but it is trying to

  • 0

I am trying to run py.test on my package but it is trying to parse setup.py from the project root directory even if I tried to exclude it.

I need to collect the tests from *.py files because the test classes are included in the modules.

# setup.cfg
[pytest]
norecursedirs = .svn _build tmp* lib/third lib *.egg bin distutils setup.py
python_files = *.py

Still when I run py.test it will give me ERROR collecting setup.py which I already excluded.

/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py:140: in setup
>           raise SystemExit, gen_usage(dist.script_name) + "\nerror: %s" % msg
E           SystemExit: usage: py.test [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
E              or: py.test --help [cmd1 cmd2 ...]
E              or: py.test --help-commands
E              or: py.test cmd --help
E           
E           error: no commands supplied
  • 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-04T22:59:27+00:00Added an answer on June 4, 2026 at 10:59 pm

    You can configure the –ignore option to your pytest.ini configuration like this maybe:

    addopts = --ignore=setup.py
    

    which should help if you are in the root directory and want py.test to ignore the setup.py file.

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

Sidebar

Related Questions

I'm trying to run JUnit4 test cases on Eclipse 3.4.2 but it's not even
I am trying to run a nodeJS test script with socket.io but the deployed
I'm trying to run some JUnit test units in Eclipse 3.5, but with no
I am trying to package my project. But, it automatically runs the tests previous
I'm trying to run a test version of a web using the File System
I am trying to run my test cases on Chrome and I had copied
I am trying to run PHPUnit test at CakePHP 2.0. There's no problem with
I am trying to run a test on selenium IDE to enter to my
I'm trying to run a test suite that will handle the jQuery lightbox. Lightbox
When trying to run a junit test I get the following error - java.lang.ClassCastException:

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.