Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration Files - Add an option to read them from command line parameter or an environment variable #174

Closed
pytestbot opened this issue Aug 5, 2012 · 5 comments
Labels
type: enhancement new feature or API change, should be merged into features branch

Comments

@pytestbot
Copy link
Contributor

Originally reported by: Shay Weiss (BitBucket: lost_dm, GitHub: lost_dm)


Use case: I would like to be able to run a simple "py.test" discovery from the root of the trunk and not have the configuration files clutter the root.

I would expect to be able to either supply a different path to configuration files than that of the discovery via a command line argument:
"py.test path/to/testdir -c path/to/configurationfile"

Alternately, I would like to have an environment variable which will be checked prior to "path/to/testdir".


@pytestbot
Copy link
Contributor Author

Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42):


(Reply via hol...@merlinux.eu):

Hi Shay,

i agree this would be a very useful addition.

Holger

P.S.: also testing if bitbucket's issue-reply address routes my message to the issue ...

@pytestbot
Copy link
Contributor Author

Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42):


Agreed, this looks worthwhile. Do you think you could checkout a dev version and try to implement the feature and a test yourself? (_pytest/config.py and testing/test_config.py will be the two relevant files to change i think).

@pytestbot
Copy link
Contributor Author

Original comment by Shay Weiss (BitBucket: lost_dm, GitHub: lost_dm):


(Reply via anot...@gmail.com):

That is exactly what I intend on doing this very week ^_^
I will update when it is done.

On Mon, Aug 6, 2012 at 10:30 AM, holger krekel
issues-reply@bitbucket.orgwrote:

@pytestbot
Copy link
Contributor Author

Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42):


still up for trying a patch?

@pytestbot pytestbot added the type: enhancement new feature or API change, should be merged into features branch label Jun 15, 2015
@The-Compiler
Copy link
Member

There is a -c argument nowadays, so I'm closing this.

fkohlgrueber pushed a commit to fkohlgrueber/pytest that referenced this issue Oct 27, 2018
Neovim uses stdout for `msgpack` communication and the `subprocess` call for `virtualenv` was leaking that stream. Fix is to attach to a `subprocess.PIPE`.
mgorny pushed a commit to mgorny/pytest that referenced this issue May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement new feature or API change, should be merged into features branch
Projects
None yet
Development

No branches or pull requests

2 participants