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

  • Home
  • SEARCH
  • 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 8311919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:58:28+00:00 2026-06-08T19:58:28+00:00

In tests directory has 2 sub-directories such as tests/api and tests/sanity. Note tests/api has

  • 0

In tests directory has 2 sub-directories such as tests/api and tests/sanity. Note tests/api has conftest.py that expects to find input.conf in tests/api directory. Note running tests from tests/api works fine. But run test from parent directory tests, it failed with:
py.test –test_option=input.conf
Usage: py.test [options] [file_or_dir] [file_or_dir] […]

py.test: error: no such option: –test_option

Can someone please shows how I can structure my test so this would work?
I also tried specify the test directory such as the following but it cannot find input.conf.
py.test –test_option=input.conf api/test_api.py

E IOError: [Errno 2] No such file or directory: ‘input.conf’

  • 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-08T19:58:31+00:00Added an answer on June 8, 2026 at 7:58 pm

    Assuming that your syntax is correct (you are I think transposing the name and extension of the file) you just need to specify the location of the file correctly including relative or absolute path:

    Instead of:

    py.test --test_option=input.conf
    

    do:

    py.test --test_option=api/input.conf 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following test directory structure and each has their own conftest.py: tests/api
I have a directory with multiple sub directories that contain .doc files. Example: C:\Users\tmedina\Documents\testenviroment\Released\500\test0.doc
I have a directory tmp that has 3 test node.js modules [mod0.js, mod1.js, mod2.js]
In my repo trunk I have a directory unit-tests that I want to keep
Using ANT and SVNANT, I want to check in a working directory that has
A co-worker has inherited a Microsoft Access macro that executes a series of SQL
I have this method in a Directory model: public List<Directory> subdirectories() { return find(select
I am working on a PHP function that will recursively remove all sub-folders that
I have uploaded a site built with asp.net 2.0 in a sub directory created
My gem semantictext has a bunch of test data that it reads for regression

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.