Skip to content

pytest.main() modifies current working directory #39

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

Closed
pytestbot opened this issue Apr 11, 2011 · 2 comments
Closed

pytest.main() modifies current working directory #39

pytestbot opened this issue Apr 11, 2011 · 2 comments
Labels
type: bug problem that needs to be addressed

Comments

@pytestbot
Copy link
Contributor

Originally reported by: eduardo schettino (BitBucket: schettino72, GitHub: schettino72)


The value of os.getcwd() is changed after I call pytest.main().

I guess it would be better if pytest restored the original value...


@pytestbot
Copy link
Contributor Author

Original comment by Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt):


can you give a working minimal example, as far as i can tell there is no place in the current code that does chdir outside of the pytester plugin which is only ueful for pytest plugin acceptance tests

@pytestbot
Copy link
Contributor Author

Original comment by eduardo schettino (BitBucket: schettino72, GitHub: schettino72):


I am sorry for the noise. my own test was messing up with the cwd.

@pytestbot pytestbot added the type: bug problem that needs to be addressed label Jun 15, 2015
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: bug problem that needs to be addressed
Projects
None yet
Development

No branches or pull requests

1 participant