﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
8047	admin_scripts tests doesn't work on Jython	Leo Soto M.	Jacob	"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 `PYTHONPATH`"" from `sys.path` instead of `os.environ['PYTHONPATH']`.

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 `<django-root>/tests/`. 

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 `<django-root>`, `<django-root>/tests/regressiontests/` and `<external-backend-root>`."		closed	Testing framework	dev		fixed	jython		Accepted	1	0	0	0	0	0
