@@ -68,18 +68,19 @@ def working_tests():
68
68
return working_tests
69
69
70
70
71
- for working_test in working_tests ():
71
+ WORKING_TESTS = working_tests ()
72
+ for idx , working_test in enumerate (WORKING_TESTS ):
72
73
def make_test_func (working_test ):
73
74
def fun ():
74
- cmd = [sys .executable , "-m" , "unittest" ]
75
+ cmd = [sys .executable , "-S" , "- m" , "unittest" ]
75
76
for testpattern in working_test [1 ]:
76
77
cmd .extend (["-k" , testpattern ])
77
78
testmod = working_test [0 ].rpartition ("." )[2 ]
78
79
print ()
79
80
cmd .append (os .path .join (os .path .dirname (test .__file__ ), "%s.py" % testmod ))
80
81
subprocess .check_call (cmd )
81
82
82
- fun .__name__ = working_test [0 ]
83
+ fun .__name__ = "%s[%d/%d]" % ( working_test [0 ], idx + 1 , len ( WORKING_TESTS ))
83
84
return fun
84
85
85
86
test_f = make_test_func (working_test )
@@ -113,7 +114,7 @@ def fun():
113
114
for idx , testfile in enumerate (testfiles ):
114
115
testfile_stem = os .path .splitext (os .path .basename (testfile ))[0 ]
115
116
testmod = "test." + testfile_stem
116
- cmd = [timeout , "-s" , "9" , "60" ] + executable + ["-m" ]
117
+ cmd = [timeout , "-s" , "9" , "60" ] + executable + ["-S" , "- m" ]
117
118
tagfile = os .path .join (TAGS_DIR , testfile_stem + ".txt" )
118
119
test_selectors = working_selectors (tagfile )
119
120
@@ -122,7 +123,7 @@ def fun():
122
123
# not been tried)
123
124
continue
124
125
125
- print ("[%d/%d] Testing %s" % (idx , len (testfiles ), testmod ))
126
+ print ("[%d/%d] Testing %s" % (idx + 1 , len (testfiles ), testmod ))
126
127
cmd += ["unittest" , "-v" ]
127
128
for selector in test_selectors :
128
129
cmd += ["-k" , selector ]
0 commit comments