File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -506,6 +506,7 @@ def test_save_invalid_path(base_app, capsys):
506506
507507def test_output_redirection (base_app ):
508508 fd , filename = tempfile .mkstemp (prefix = 'cmd2_test' , suffix = '.txt' )
509+ os .close (fd )
509510
510511 try :
511512 # Verify that writing to a file works
@@ -530,7 +531,8 @@ def test_output_redirection(base_app):
530531def test_feedback_to_output_true (base_app ):
531532 base_app .feedback_to_output = True
532533 base_app .timing = True
533- fd , filename = tempfile .mkstemp (prefix = 'cmd2_test' , suffix = '.txt' )
534+ f , filename = tempfile .mkstemp (prefix = 'cmd2_test' , suffix = '.txt' )
535+ os .close (f )
534536
535537 try :
536538 run_cmd (base_app , 'help > {}' .format (filename ))
@@ -546,7 +548,8 @@ def test_feedback_to_output_true(base_app):
546548def test_feedback_to_output_false (base_app , capsys ):
547549 base_app .feedback_to_output = False
548550 base_app .timing = True
549- fd , filename = tempfile .mkstemp (prefix = 'feedback_to_output' , suffix = '.txt' )
551+ f , filename = tempfile .mkstemp (prefix = 'feedback_to_output' , suffix = '.txt' )
552+ os .close (f )
550553
551554 try :
552555 run_cmd (base_app , 'help > {}' .format (filename ))
You can’t perform that action at this time.
0 commit comments