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
12
third_party/python/Lib/test/test_decimal.py
vendored
12
third_party/python/Lib/test/test_decimal.py
vendored
|
@ -46,6 +46,9 @@ try:
|
|||
except ImportError:
|
||||
threading = None
|
||||
|
||||
if __name__ == 'PYOBJ.COM':
|
||||
import decimal
|
||||
import fractions
|
||||
|
||||
C = import_fresh_module('decimal', fresh=['_decimal'])
|
||||
P = import_fresh_module('decimal', blocked=['_decimal'])
|
||||
|
@ -108,14 +111,7 @@ def init(m):
|
|||
)
|
||||
m.setcontext(DefaultTestContext)
|
||||
|
||||
TESTDATADIR = 'decimaltestdata'
|
||||
if __name__ == '__main__':
|
||||
file = sys.argv[0]
|
||||
else:
|
||||
file = __file__
|
||||
testdir = os.path.dirname(file) or os.curdir
|
||||
directory = testdir + os.sep + TESTDATADIR + os.sep
|
||||
|
||||
directory = '/zip/.python/test/decimaltestdata'
|
||||
skip_expected = not os.path.isdir(directory)
|
||||
|
||||
# Make sure it actually raises errors when not expected and caught in flags
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue