Message8099

Author jeff.allen
Recipients jeff.allen
Date 2013-09-05.06:39:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1378363194.19.0.160010898026.issue2082@psf.upfronthosting.co.za>
In-reply-to
Content
Certain regression tests hang unexpectedly, producing a (Pdb) prompt. The test will continue if you enter an end-of-file (^Z on Windows) which to some tests is a failure.

I noticed this while working on the restructured Jython console, and for a while thought I had induced it, but it is present in the baseline, back to at least tag 2.7b1 and after a clean build. (Regression tests have never run smoothly for me on Windows.)

Affected Python tests are:
test.test_doctest
test.test_pdb
These show up in "ant regrtest". Unsticking the test with ctrl-Z\n is counted as a test failure. It seems that the test function compares the
responses to a "script" of  pdb interactions at a pretended console. The only divergence I can see is an extra blank line at the end.

The only affected Java test is:
org.python.jsr223.ScriptEngineTest

This does not show up in "ant javatest", but only when run as:
>java -cp dist/*;dist/javalib/* org.junit.runner.JUnitCore org.python.jsr223.ScriptEngineTest
And running this with the input piped from NUL (the always-empty stream in Windows) causes it to run to completion, although the (Pdb) prompt still appears.

In the Python tests, typical behaviour is:
>dist\bin\jython -m test.test_doctest
doctest (doctest) ... 66 tests with zero failures
(Pdb)   <--- ctrl-Z  + return entered here
**********************************************************************
File "C:\hg\jython-int\dist\Lib\test\test_doctest.py", line 1758, in test.test_doctest.test_debug
Failed example:
    try: doctest.debug_src(s)
    finally: sys.stdin = real_stdin
Expected:
    > <string>(1)<module>()
    (Pdb) next
    12
    --Return--
    > <string>(1)<module>()->None
    (Pdb) print x
    12
    (Pdb) continue
Got:
    > <string>(1)<module>()
    <BLANKLINE>
(Pdb)

Switching to the plain InteractiveConsole causes the Python tests to run smoothly, but does not affect matters in the Java test.
History
Date User Action Args
2013-09-05 06:39:54jeff.allensetrecipients: + jeff.allen
2013-09-05 06:39:54jeff.allensetmessageid: <1378363194.19.0.160010898026.issue2082@psf.upfronthosting.co.za>
2013-09-05 06:39:53jeff.allenlinkissue2082 messages
2013-09-05 06:39:53jeff.allencreate