File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -514,12 +514,13 @@ def test_forever(tests=list(selected)):
514514 if bad :
515515 return
516516 tests = test_forever ()
517+ test_count = ''
518+ test_count_width = 3
517519 else :
518520 tests = iter (selected )
521+ test_count = '/{}' .format (len (selected ))
522+ test_count_width = len (test_count ) - 1
519523
520- tests = list (tests )
521- test_count = len (tests )
522- test_count_width = len (str (test_count ))
523524 if use_mp :
524525 try :
525526 from threading import Thread
@@ -578,7 +579,7 @@ def work():
578579 finished += 1
579580 continue
580581 if not quiet :
581- print ("[{1:{0}}/{2:{0} }] {3}" .format (
582+ print ("[{1:{0}}{2 }] {3}" .format (
582583 test_count_width , test_index , test_count , test ))
583584 if stdout :
584585 print (stdout )
@@ -597,7 +598,7 @@ def work():
597598 else :
598599 for test_index , test in enumerate (tests , 1 ):
599600 if not quiet :
600- print ("[{1:{0}}/{2:{0} }] {3}" .format (
601+ print ("[{1:{0}}{2 }] {3}" .format (
601602 test_count_width , test_index , test_count , test ))
602603 sys .stdout .flush ()
603604 if trace :
You can’t perform that action at this time.
0 commit comments