-
Notifications
You must be signed in to change notification settings - Fork 348
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
Look in child dirs when discovering django project #586
Conversation
py is in maintenance mode and there are modern alternatives
Codecov Report
@@ Coverage Diff @@
## master #586 +/- ##
==========================================
- Coverage 91.92% 91.84% -0.09%
==========================================
Files 33 33
Lines 1660 1667 +7
Branches 143 148 +5
==========================================
+ Hits 1526 1531 +5
Misses 95 95
- Partials 39 41 +2
Continue to review full report at Codecov.
|
I'm -0 on this: I do not like too much magic, which also means overhead - but have this feature altogether disabled for my projects usually anyway. |
@blueyed Assuming you agree to the code in the first commit, the new functionality is contained in two lines of code, and imo this change makes the auto-discovery much more useful. If you don't like the new feature, I would still suggest the first commit to be included. Is there anything I can do to move this discussion forward? |
Moved the first commit to #631. |
#631 has been merged. |
btw: #478 - it uses testpaths. |
Closing for now. |
Hi! 👋
In a lot of projects I work on, the django project is in a
src
subfolder of the repository. :folThese changes allow pytest-django to discover the project when
pytest
is run from the root folder of the repository.While reading the code, I discovered that
py
is in maintenance mode, so I replaced it withpathlib
, which is in the standard library.What do you think about these changes?
PS:
I tried to run
tox
locally, but there were some errors regarding the postgres database. Running one using Docker didn't work either. I also had a little trouble understanding how the django-project-directory-discovery is tested in general, if you feel like this feature deserves a test, please give me some pointers on how to do it.