#23778: Running tests outside the test runner needs clarification
--------------------------------------+------------------------------------
Reporter: Starou | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.7
Severity: Normal | Resolution:
Keywords: tests run_tests | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by Starou):
Replying to [comment:1 timgraham]:
> Yes, something like this seems like a good idea. We shouldn't suggest
using `sys.path` though, per #19941 (comment 9 and later).
In my case - AFAIR - using `PYTHONPATH` does not works because it came
after installed packages in the resolution order (because I want my test
project to run against the source located in `../..` and not against the
sources I may have system-wide installed.
This is only true for the first `sys.path.insert(0, '../../')`, the
test_project path can be put in `PYTHONPATH`.
In my case, I prefered not to mix both.
Anyway, the first insert is very specific and can be removed and the
second converted in a `PYTHONPATH` expression.
> Would you like to submit a patch? I'll be happy to review it.
With pleasure.
--
Ticket URL: <https://code.djangoproject.com/ticket/23778#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.e12817b092cdd10133edf664c89c0ebd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.