[issue41731] test_cmd_line_script fails with verbosity level more than 1

2020-09-12 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks Terry.

--

___
Python tracker 

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



[issue41731] test_cmd_line_script fails with verbosity level more than 1

2020-09-12 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> fixed
stage: patch review -> 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



[issue41731] test_cmd_line_script fails with verbosity level more than 1

2020-09-11 Thread miss-islington


miss-islington  added the comment:


New changeset 34e3c7592be70f652c293eb179593bf2928adeb4 by Miss Islington (bot) 
in branch '3.9':
bpo-41731: Make test_cmd_line_script pass with -vv (GH-22206)
https://github.com/python/cpython/commit/34e3c7592be70f652c293eb179593bf2928adeb4


--

___
Python tracker 

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



[issue41731] test_cmd_line_script fails with verbosity level more than 1

2020-09-11 Thread miss-islington


miss-islington  added the comment:


New changeset 77901dc6c3d06dd31f6c84b2d3cb21dc26b1e351 by Miss Islington (bot) 
in branch '3.8':
bpo-41731: Make test_cmd_line_script pass with -vv (GH-22206)
https://github.com/python/cpython/commit/77901dc6c3d06dd31f6c84b2d3cb21dc26b1e351


--

___
Python tracker 

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



[issue41731] test_cmd_line_script fails with verbosity level more than 1

2020-09-11 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +21268
pull_request: https://github.com/python/cpython/pull/22213

___
Python tracker 

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



[issue41731] test_cmd_line_script fails with verbosity level more than 1

2020-09-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21269
pull_request: https://github.com/python/cpython/pull/22214

___
Python tracker 

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



[issue41731] test_cmd_line_script fails with verbosity level more than 1

2020-09-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 7e711ead26fea6465e0ef2e3b8880b57ba8fc129 by Terry Jan Reedy in 
branch 'master':
bpo-41731: Make test_cmd_line_script pass with -vv (GH-22206)
https://github.com/python/cpython/commit/7e711ead26fea6465e0ef2e3b8880b57ba8fc129


--

___
Python tracker 

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



[issue41731] test_cmd_line_script fails with verbosity level more than 1

2020-09-11 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +21260
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22206

___
Python tracker 

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



[issue41731] test_cmd_line_script fails with verbosity level more than 1

2020-09-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I verified with master on Win10 debug 32 build. The relevant lines, 147-151, are

if verbose > 1:
print('Output from test script %r:' % script_exec_args)
print(repr(err))
print('Expected output: %r' % expected_msg)
self.assertIn(expected_msg.encode('utf-8'), err)

Normally, 'script_exec_args' is singular, the absolute file name to be 
executed.  In the two failing cases, file 'name' is an import name, preceded by 
-m.  Line 148 prints an informational header, when very verbose is requested, 
that only serves to identify the following lines. It is *not* tested.  
Therefore, we need not worry about the exact format, just avoiding a spurious 
error.  The following is equivalent except when the value is a list (which 
should have been a tuple), when is prints without error:

print(f'Output from test script {script_exec_args!r:}')

"Output from test script ['-m', 'test_pkg']:" seems clear enough for any human 
reader.I ran entire suite with -vv and did not find any other new, 
unexpected errors.  PR to follow shortly.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue41731] test_cmd_line_script fails with verbosity level more than 1

2020-09-05 Thread Karthikeyan Singaravelan


New submission from Karthikeyan Singaravelan :

When verbosity level is more than 1 the test tries to print the 
script_exec_args passed to script. It fails when the tuple has more than 1 
elements and is used in formatting with %r. The two tests fail as below : 

./python -m test test_cmd_line_script -vv

==
ERROR: test_package_error (test.test_cmd_line_script.CmdLineTest)
--
Traceback (most recent call last):
  File "/root/cpython/Lib/test/test_cmd_line_script.py", line 368, in 
test_package_error
self._check_import_error(["-m", "test_pkg"], msg, cwd=script_dir)
  File "/root/cpython/Lib/test/test_cmd_line_script.py", line 148, in 
_check_import_error
print('Output from test script %r:' % script_exec_args)
TypeError: not all arguments converted during string formatting

==
ERROR: test_package_recursion (test.test_cmd_line_script.CmdLineTest)
--
Traceback (most recent call last):
  File "/root/cpython/Lib/test/test_cmd_line_script.py", line 379, in 
test_package_recursion
self._check_import_error(["-m", "test_pkg"], msg, cwd=script_dir)
  File "/root/cpython/Lib/test/test_cmd_line_script.py", line 148, in 
_check_import_error
print('Output from test script %r:' % script_exec_args)
TypeError: not all arguments converted during string formatting

--

Ran 44 tests in 4.936s

FAILED (errors=2)
test test_cmd_line_script failed
test_cmd_line_script failed

== Tests result: FAILURE ==

1 test failed:
test_cmd_line_script

Total duration: 5.0 sec
Tests result: FAILURE

--
components: Tests
messages: 376457
nosy: xtreak
priority: normal
severity: normal
status: open
title: test_cmd_line_script fails with verbosity level more than 1
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

___
Python tracker 

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