admin_scripts tests doesn't work on Jython
|Reported by:||Leo Soto M.||Owned by:||Jacob|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
This set of tests rely on the
PYTHONPATH environment variable to set the
sys.path of the child python processes it launches and to read the potential location of external backends. But Jython doesn't use
PYTHONPATH (nor does IronPython, for the record).
The attached patch fixes this by:
- Tweaking the command line to be executed depending on the current platform.
- Reading the "current
It also contains code to remove the compiled files generated from Jython, and avoids a check for the "pyc" extension on the output.
The only drawback I can see is that by using
sys.path instead of
PYTHONPATH, I've incremented the number places where a pre-existing 'settings.py' file would break the test. Practical example: a settings.py file under
If it is considered to be worth the effort, this patch could be improved by trying to point the the child's
sys.path to only
Change History (15)
comment:1 Changed 8 years ago by
|Patch needs improvement:||unset|
comment:8 Changed 8 years ago by
|Owner:||changed from nobody to Jacob|
|Triage Stage:||Unreviewed → Accepted|