@@ -163,6 +163,7 @@ def test_call_subprocess_stdout_only(
163163 "-c" ,
164164 "import sys; sys.stdout.write('out\\ n'); sys.stderr.write('err\\ n')" ,
165165 ],
166+ command_desc = "test stdout_only" ,
166167 stdout_only = stdout_only ,
167168 )
168169 assert out in expected
@@ -271,7 +272,11 @@ def test_debug_logging(
271272 """
272273 log_level = DEBUG
273274 args , spinner = self .prepare_call (caplog , log_level )
274- result = call_subprocess (args , spinner = spinner )
275+ result = call_subprocess (
276+ args ,
277+ command_desc = "test debug logging" ,
278+ spinner = spinner ,
279+ )
275280
276281 expected = (
277282 ["Hello" , "world" ],
@@ -301,7 +306,11 @@ def test_info_logging(
301306 """
302307 log_level = INFO
303308 args , spinner = self .prepare_call (caplog , log_level )
304- result = call_subprocess (args , spinner = spinner )
309+ result = call_subprocess (
310+ args ,
311+ command_desc = "test info logging" ,
312+ spinner = spinner ,
313+ )
305314
306315 expected : Tuple [List [str ], List [Tuple [str , int , str ]]] = (
307316 ["Hello" , "world" ],
@@ -331,7 +340,11 @@ def test_info_logging__subprocess_error(
331340 args , spinner = self .prepare_call (caplog , log_level , command = command )
332341
333342 with pytest .raises (InstallationSubprocessError ) as exc :
334- call_subprocess (args , spinner = spinner )
343+ call_subprocess (
344+ args ,
345+ command_desc = "test info logging with subprocess error" ,
346+ spinner = spinner ,
347+ )
335348 result = None
336349 exc_message = str (exc .value )
337350 assert exc_message .startswith ("Command errored out with exit status 1: " )
@@ -390,7 +403,12 @@ def test_info_logging_with_show_stdout_true(
390403 """
391404 log_level = INFO
392405 args , spinner = self .prepare_call (caplog , log_level )
393- result = call_subprocess (args , spinner = spinner , show_stdout = True )
406+ result = call_subprocess (
407+ args ,
408+ command_desc = "test info logging with show_stdout" ,
409+ spinner = spinner ,
410+ show_stdout = True ,
411+ )
394412
395413 expected = (
396414 ["Hello" , "world" ],
@@ -456,6 +474,7 @@ def test_spinner_finish(
456474 try :
457475 call_subprocess (
458476 args ,
477+ command_desc = "spinner go spinny" ,
459478 show_stdout = show_stdout ,
460479 extra_ok_returncodes = extra_ok_returncodes ,
461480 spinner = spinner ,
@@ -474,6 +493,7 @@ def test_closes_stdin(self) -> None:
474493 call_subprocess (
475494 [sys .executable , "-c" , "input()" ],
476495 show_stdout = True ,
496+ command_desc = "stdin reader" ,
477497 )
478498
479499
@@ -487,6 +507,7 @@ def test_unicode_decode_error(caplog: pytest.LogCaptureFixture) -> None:
487507 "-c" ,
488508 "import sys; sys.stdout.buffer.write(b'\\ xff')" ,
489509 ],
510+ command_desc = "invalid decode output" ,
490511 show_stdout = True ,
491512 )
492513
0 commit comments