-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
fix: Find pyproject.toml in upper directories #160
Conversation
Ah, I should probably handle the case where a pyproject.toml file is never found, otherwise we'll get an infinite loop. What should we do if there's no pyproject.toml by the way? |
There is already a check in read_config() and it will give you a Config with defaults. |
The code is covered, but only because it searches all the way down to /. And also documentation and a changelog entry. |
Nice simplification of the test 👍 |
Previously, the code assumed that pyproject.toml was located next to the Pytest config file, which is not always the case. Now we simply climb up the directory tree to search for the closest pyproject.toml. Let me know if you think of a better approach 🙂