Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#8268 closed (fixed)

admin_scripts test doesn't take into account the JYTHONPATH environment variable

Reported by: Leo Soto M. Owned by: Leo Soto M.
Component: Testing framework Version: dev
Severity: Keywords: jython
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Very recently Jython started to recognize the JYTHONPATH environment variable.

Thus, it should be cleared before calling a jython subprocess and restored afterwards, on source:django/trunk/tests/regressiontests/admin_scripts/tests.py.

Attachments (2)

8268-r8371.diff (1.3 KB ) - added by Russell Keith-Magee 16 years ago.
Possible patch for JYTHOPATH handling
admin_scripts_jythonpath.diff (3.3 KB ) - added by Leo Soto M. 16 years ago.
slightly more invasive fix, gets rid of _sys_executable()

Download all attachments as: .zip

Change History (7)

comment:1 by Jacob, 16 years ago

Triage Stage: UnreviewedAccepted

by Russell Keith-Magee, 16 years ago

Attachment: 8268-r8371.diff added

Possible patch for JYTHOPATH handling

comment:2 by Russell Keith-Magee, 16 years ago

@leosoto - is this patch all that is required?

comment:3 by Leo Soto M., 16 years ago

@russellm: Yes, it works.

I was thinking of also simplifying things by removing _sys_executable() and directly using JYTHONPATH instead of PYTHONPATH on the caller. If you like the idea, it is implemented on the attached patch, tested with both Jython and CPython.

by Leo Soto M., 16 years ago

slightly more invasive fix, gets rid of _sys_executable()

comment:4 by Russell Keith-Magee, 16 years ago

Resolution: fixed
Status: newclosed

(In [8400]) Fixed #8268: Modified admin scripts tests to use JYTHONPATH when appropriate. Thanks to leosoto for the patch.

comment:5 by Jacob, 13 years ago

milestone: 1.0

Milestone 1.0 deleted

Note: See TracTickets for help on using tickets.
Back to Top