mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Begin incorporating Python unit tests into build
We now build a separate APE binary for each test so they can run in parallel. We've got 148 tests running fast and stable so far.
This commit is contained in:
parent
51904e2687
commit
b5f743cdc3
121 changed files with 4995 additions and 4767 deletions
11
third_party/python/Lib/unittest/runner.py
vendored
11
third_party/python/Lib/unittest/runner.py
vendored
|
@ -1,5 +1,6 @@
|
|||
"""Running tests"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import warnings
|
||||
|
@ -38,7 +39,7 @@ class TextTestResult(result.TestResult):
|
|||
super(TextTestResult, self).__init__(stream, descriptions, verbosity)
|
||||
self.stream = stream
|
||||
self.showAll = verbosity > 1
|
||||
self.dots = verbosity == 1
|
||||
self.dots = verbosity == 1 and os.getenv('MAKEFLAGS') is None
|
||||
self.descriptions = descriptions
|
||||
|
||||
def getDescription(self, test):
|
||||
|
@ -183,8 +184,12 @@ class TextTestRunner(object):
|
|||
result.printErrors()
|
||||
|
||||
# [jart local modification]
|
||||
# [print nothing on success in quiet mode]
|
||||
if not self.verbosity and result.wasSuccessful():
|
||||
# print nothing on success, if
|
||||
# 1. running in quiet mode, or
|
||||
# 2. running under gnu make
|
||||
if ((not self.verbosity or
|
||||
os.getenv('MAKEFLAGS') is not None) and
|
||||
result.wasSuccessful()):
|
||||
return result
|
||||
|
||||
if hasattr(result, 'separator2'):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue