[issue31761] regrtest: faulthandler.enable() fails with io.UnsupportedOperation: fileno when run from IDLE

2017-10-13 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

After starting Python from a command line instead of an icon, importing/running 
autotest results in the same three failures.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31761] regrtest: faulthandler.enable() fails with io.UnsupportedOperation: fileno when run from IDLE

2017-10-12 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

When I import autotest in IDLE's shell, test_code_module fails, test_importlib 
and test_warnings fail, as without IDLE, and test_gc and test_logging are new 
failures.  (Results are easy to see because SystemExit is caught and ignored.)

test test_gc failed -- Traceback (most recent call last):
  File "F:\dev\3x\lib\test\support\__init__.py", line 1855, in wrapper
return func(*args, **kwargs)
  File "F:\dev\3x\lib\test\test_gc.py", line 290, in test_get_count
self.assertLess(a, 5)
AssertionError: 8 not less than 5




test test_logging failed -- Traceback (most recent call last):
  File "F:\dev\3x\lib\test\test_logging.py", line 1960, in test_warnings
"dummy.py:42: UserWarning: Explicit\n  Dummy line\n")
AssertionError: '\nWarning (from warnings module):\n  File[57 chars]it\n' != 
'dummy.py:42: UserWarning: Explicit\n  Dummy line\n'
+ dummy.py:42: UserWarning: Explicit
- 
- Warning (from warnings module):
-   File "dummy.py", line 42
- Dummy line
? --
+   Dummy line
- UserWarning: Explicit

IDLE replaces warnings.show_warnings.  In any case, there are 3 failures in 
Python's shell versus 4 in IDLE's shell.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31761] regrtest: faulthandler.enable() fails with io.UnsupportedOperation: fileno when run from IDLE

2017-10-12 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

The Python console exits because test.libregrtest.main.Regrtest._main calls 
sys.exit.  test.autotest consists of

from test.libregrtest import main
main()

The main call should be wrapped with try:...except sys.exit: pass

The output also has this variance from the command line result.

0:15:47 [319/407/2] test_subprocess
minkernel\crts\ucrt\src\appcrt\lowio\write.cpp(49) : Assertion failed: 
(_osfile(fh) & FOPEN)
minkernel\crts\ucrt\src\appcrt\lowio\close.cpp(49) : Assertion failed: 
(_osfile(fh) & FOPEN)
minkernel\crts\ucrt\src\appcrt\lowio\close.cpp(49) : Assertion failed: 
(_osfile(fh) & FOPEN)

The list of tests skipped seems to be the same.

By setting sys.argv before importing autotest, I got
==
FAIL: test_ps1 (test.test_code_module.TestInteractiveConsole)
--
Traceback (most recent call last):
  File "F:\dev\3x\lib\test\test_code_module.py", line 35, in test_ps1
self.assertEqual(self.sysmod.ps1, '>>> ')
AssertionError:  != '>>> '

==
FAIL: test_ps2 (test.test_code_module.TestInteractiveConsole)
--
Traceback (most recent call last):
  File "F:\dev\3x\lib\test\test_code_module.py", line 40, in test_ps2
self.assertEqual(self.sysmod.ps2, '... ')
AssertionError:  != '... '

--

==
FAIL: test_missing_filename_main_with_argv (test.test_warnings.CWarnTests)
--
Traceback (most recent call last):
  File "F:\dev\3x\lib\test\test_warnings\__init__.py", line 446, in 
test_missing_filename_main_with_argv
self.assertEqual(w[-1].filename, sys.argv[0])
AssertionError: '__main__' != ''
- __main__
+

and

==
FAIL: test_missing_filename_main_with_argv (test.test_warnings.PyWarnTests)
--
Traceback (most recent call last):
  File "F:\dev\3x\lib\test\test_warnings\__init__.py", line 446, in 
test_missing_filename_main_with_argv
self.assertEqual(w[-1].filename, sys.argv[0])
AssertionError: '__main__' != ''
- __main__

Wneh I start python with python.bat, sys.argv = [''], not ['__main__'].

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31761] regrtest: faulthandler.enable() fails with io.UnsupportedOperation: fileno when run from IDLE

2017-10-12 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

0:00:28 [ 25/407] test_asyncio
F:\dev\3x\lib\asyncio\sslproto.py:330: ResourceWarning: unclosed transport 

  source=self)

test_code_module - multiple errors

test test_importlib failed -- Traceback (most recent call last):
  File "F:\dev\3x\lib\test\test_importlib\test_locks.py", line 134, in 
test_all_locks
self.bootstrap._module_locks)
AssertionError: 0 != 1 : {'test.autotest': }

test_warnings failed - multiple errors

crash after summary printed.
I am rerunning in python started from command to see if there is any message 
printed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31761] regrtest: faulthandler.enable() fails with io.UnsupportedOperation: fileno when run from IDLE

2017-10-12 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Victor, what is your opinion of running 'from test import autotest' in a 
standard python shell window, opened from an icon, as opposed to IDLE's shell?

>  many tests fail just because of IDLE.

We cannot know what to blame on IDLE without a proper control experiment.  I 
updated my Win10 repository, rebuilt python 3.7, ran the tests from the command 
line, and all passed (thank you for making this routine).  I ran autotest in a 
Python console and saw a new resource warning from one of the async tests and 3 
failures.  I cannot say what they were because when the test finished, the 
window closed (crashed), which is a metafailure.  I will rerun and try to 
identify the error as they occur.

Should we reopen this issue or open a new issue, to fix problems not due to 
IDLE, or remove the entire suggestion to use autotest, and remove autotest 
itself?

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31761] regrtest: faulthandler.enable() fails with io.UnsupportedOperation: fileno when run from IDLE

2017-10-12 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

See issue25588. Currently running tests from IDLE doesn't work, but it worked 
in the past and maybe we can make it working again.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31761] regrtest: faulthandler.enable() fails with io.UnsupportedOperation: fileno when run from IDLE

2017-10-12 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

Closing this issue, I opened https://github.com/python/devguide/issues/280 so 
that Dev Guide can be updated.

Thanks!

--
nosy: +Mariatta
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31761] regrtest: faulthandler.enable() fails with io.UnsupportedOperation: fileno when run from IDLE

2017-10-12 Thread Denis Osipov

Denis Osipov  added the comment:

Got it. Thank you for your help.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31761] regrtest: faulthandler.enable() fails with io.UnsupportedOperation: fileno when run from IDLE

2017-10-12 Thread STINNER Victor

STINNER Victor  added the comment:

> "If you don’t have easy access to a command line, you can run the test suite 
> from a Python or IDLE shell:

The devguide is wrong. You should not run the Python test suite in IDLE. It 
doesn't work and many tests fail just because of IDLE.

Please run the test suite in a command line (like "cmd.exe" on Windows).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31761] regrtest: faulthandler.enable() fails with io.UnsupportedOperation: fileno when run from IDLE

2017-10-12 Thread STINNER Victor

Change by STINNER Victor :


--
components: +Tests -Documentation
title: Possible error in devguide part about tests -> regrtest: 
faulthandler.enable() fails with io.UnsupportedOperation: fileno when run from 
IDLE

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com