Opened 7 years ago

Closed 7 years ago

Last modified 4 years ago

#8268 closed (fixed)

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

Reported by: leosoto Owned by: leosoto
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 russellm 7 years ago.
Possible patch for JYTHOPATH handling
admin_scripts_jythonpath.diff (3.3 KB) - added by leosoto 7 years ago.
slightly more invasive fix, gets rid of _sys_executable()

Download all attachments as: .zip

Change History (7)

comment:1 Changed 7 years ago by jacob

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Changed 7 years ago by russellm

Possible patch for JYTHOPATH handling

comment:2 Changed 7 years ago by russellm

@leosoto - is this patch all that is required?

comment:3 Changed 7 years ago by leosoto

@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 7 years ago by leosoto

slightly more invasive fix, gets rid of _sys_executable()

comment:4 Changed 7 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:5 Changed 4 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

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