Issue2313

classification
Title: test_jython_initializer failure on Windows
Type: behaviour Severity: normal
Components: Library Versions: Jython 2.7
Milestone:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: jamesmudd, jeff.allen
Priority: Keywords: test failure causes

Created on 2015-04-06.19:58:06 by jeff.allen, last changed 2017-03-09.21:18:33 by jamesmudd.

Messages
msg9771 (view) Author: Jeff Allen (jeff.allen) Date: 2015-04-06.19:58:05
Observed in Jython 2.7rc2 on Windows 7:

> jython -m test.test_jython_initializer
test_syspath_initializer (__main__.TestUsingInitializer) ... Traceback (most recent call last):
  File "C:\jython\2.7rc2\Lib\test\check_for_initializer_in_syspath.py", line 4, in <module>
    assert path in sys.path
AssertionError
FAIL

======================================================================
FAIL: test_syspath_initializer (__main__.TestUsingInitializer)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\jython\2.7rc2\Lib\test\test_jython_initializer.py", line 22, in test_syspath_initializer
    self.assertEquals(0, subprocess.call([sys.executable, fn], env=env))
AssertionError: 0 != -1

----------------------------------------------------------------------
Ran 1 test in 5.959s

I wonder if the path is not passed on correctly whether this might be behind several other problems with import.
msg11213 (view) Author: James Mudd (jamesmudd) Date: 2017-03-09.21:18:32
This test fails for me on Linux as well when run individually:

james@james-ubuntu:~/git/jython/dist$ bin/jython Lib/test/test_jython_initializer.py 
test_syspath_initializer (__main__.TestUsingInitializer) ... Traceback (most recent call last):
  File "/home/james/git/jython/dist/Lib/test/check_for_initializer_in_syspath.py", line 4, in <module>
    assert path in sys.path
AssertionError
FAIL

======================================================================
FAIL: test_syspath_initializer (__main__.TestUsingInitializer)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_jython_initializer.py", line 22, in test_syspath_initializer
    self.assertEquals(0, subprocess.call([sys.executable, fn], env=env))
AssertionError: 0 != 255

----------------------------------------------------------------------
Ran 1 test in 1.970s

FAILED (failures=1)
Traceback (most recent call last):
  File "Lib/test/test_jython_initializer.py", line 28, in <module>
    test_main()
  File "Lib/test/test_jython_initializer.py", line 25, in test_main
    test_support.run_unittest(TestUsingInitializer)
  File "/home/james/git/jython/dist/Lib/test/test_support.py", line 1320, in run_unittest
    _run_suite(suite)
  File "/home/james/git/jython/dist/Lib/test/test_support.py", line 1303, in _run_suite
    raise TestFailed(err)
test.test_support.TestFailed: Traceback (most recent call last):
  File "Lib/test/test_jython_initializer.py", line 22, in test_syspath_initializer
    self.assertEquals(0, subprocess.call([sys.executable, fn], env=env))
AssertionError: 0 != 255

james@james-ubuntu:~/git/jython/dist$
History
Date User Action Args
2017-03-09 21:18:33jamesmuddsetnosy: + jamesmudd
messages: + msg11213
2015-04-06 19:58:06jeff.allencreate