提交 5169452d authored 作者: Olivier Delalleau's avatar Olivier Delalleau

A few bug fixes in run_tests_in_batch

上级 afaf6ce8
...@@ -53,7 +53,7 @@ def main(): ...@@ -53,7 +53,7 @@ def main():
# COLLECTING TESTS # # COLLECTING TESTS #
####################""" ####################"""
assert subprocess.call(['nosetests', '--collect-only', '--with-id']) == 0 assert subprocess.call(['nosetests', '--collect-only', '--with-id']) == 0
noseids_file = os.path.join(tests_dir, '.noseids') noseids_file = '.noseids'
data = cPickle.load(open(noseids_file, 'rb')) data = cPickle.load(open(noseids_file, 'rb'))
ids = data['ids'] ids = data['ids']
n_tests = len(ids) n_tests = len(ids)
...@@ -79,6 +79,9 @@ def main(): ...@@ -79,6 +79,9 @@ def main():
failed += cPickle.load(open(noseids_file, 'rb'))['failed'] failed += cPickle.load(open(noseids_file, 'rb'))['failed']
print '%s%% done (failed: %s)' % ((test_range[-1] * 100) // n_tests, print '%s%% done (failed: %s)' % ((test_range[-1] * 100) // n_tests,
len(failed)) len(failed))
# Remove duplicated failed tests (may happen because it seems the 'failed'
# field is not *systematically* overwritten after each call to nosetests).
failed = sorted(set(failed))
if failed: if failed:
# Re-run only failed tests # Re-run only failed tests
print """\ print """\
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论