New submission from Karthikeyan Singaravelan <tir.kar...@gmail.com>:

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 <rep...@bugs.python.org>
<https://bugs.python.org/issue41731>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to