Opened 8 years ago

Closed 8 years ago

Last modified 5 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: master
Severity: Keywords: jython
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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 8 years ago.
Possible patch for JYTHOPATH handling
admin_scripts_jythonpath.diff (3.3 KB) - added by Leo Soto M. 8 years ago.
slightly more invasive fix, gets rid of _sys_executable()

Download all attachments as: .zip

Change History (7)

comment:1 Changed 8 years ago by Jacob

Triage Stage: UnreviewedAccepted

Changed 8 years ago by Russell Keith-Magee

Attachment: 8268-r8371.diff added

Possible patch for JYTHOPATH handling

comment:2 Changed 8 years ago by Russell Keith-Magee

@leosoto - is this patch all that is required?

comment:3 Changed 8 years ago by Leo Soto M.

@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.

Changed 8 years ago by Leo Soto M.

slightly more invasive fix, gets rid of _sys_executable()

comment:4 Changed 8 years ago by Russell Keith-Magee

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 Changed 5 years ago by Jacob

milestone: 1.0

Milestone 1.0 deleted

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