Message304298
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: <MagicMock name='sys.ps1' id='71914032'> != '>>> '
======================================================================
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: <MagicMock name='sys.ps2' id='72189080'> != '... '
----------------------------------------------------------------------
======================================================================
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__']. |
|
Date |
User |
Action |
Args |
2017-10-13 00:34:15 | terry.reedy | set | recipients:
+ terry.reedy, vstinner, docs@python, serhiy.storchaka, Mariatta, denis-osipov |
2017-10-13 00:34:15 | terry.reedy | set | messageid: <1507854855.23.0.213398074469.issue31761@psf.upfronthosting.co.za> |
2017-10-13 00:34:15 | terry.reedy | link | issue31761 messages |
2017-10-13 00:34:13 | terry.reedy | create | |
|