mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-06 21:40:09 +03:00
fixed borked merge
This commit is contained in:
parent
ac35b29f6e
commit
a2428f24bd
14
Tests/run.py
14
Tests/run.py
|
@ -27,12 +27,10 @@ include = [x for x in sys.argv[1:] if x[:2] != "--"]
|
||||||
skipped = []
|
skipped = []
|
||||||
failed = []
|
failed = []
|
||||||
|
|
||||||
python_options = " ".join(python_options)
|
|
||||||
tester_options = " ".join(tester_options)
|
|
||||||
|
|
||||||
ignore_re = re.compile('^ignore: (.*)$', re.MULTILINE)
|
ignore_re = re.compile('^ignore: (.*)$', re.MULTILINE)
|
||||||
|
|
||||||
def test_one(f):
|
def test_one(params):
|
||||||
|
f, python_options, tester_options = params
|
||||||
test, ext = os.path.splitext(os.path.basename(f))
|
test, ext = os.path.splitext(os.path.basename(f))
|
||||||
|
|
||||||
print("running", test, "...")
|
print("running", test, "...")
|
||||||
|
@ -69,13 +67,13 @@ def test_one(f):
|
||||||
|
|
||||||
return (result, status)
|
return (result, status)
|
||||||
|
|
||||||
def filter_tests(files):
|
def filter_tests(files, python_options, tester_options):
|
||||||
ret = []
|
ret = []
|
||||||
for f in files:
|
for f in files:
|
||||||
test, ext = os.path.splitext(os.path.basename(f))
|
test, ext = os.path.splitext(os.path.basename(f))
|
||||||
if include and test not in include:
|
if include and test not in include:
|
||||||
continue
|
continue
|
||||||
ret.append(f)
|
ret.append((f, python_options, tester_options))
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
@ -102,14 +100,14 @@ def main():
|
||||||
tester_options = " ".join(tester_options)
|
tester_options = " ".join(tester_options)
|
||||||
|
|
||||||
|
|
||||||
files = filter_tests(files)
|
files = filter_tests(files, python_options, tester_options)
|
||||||
|
|
||||||
pool = Pool()
|
pool = Pool()
|
||||||
results = pool.map(test_one, files)
|
results = pool.map(test_one, files)
|
||||||
pool.close()
|
pool.close()
|
||||||
pool.join()
|
pool.join()
|
||||||
|
|
||||||
for test,(result, status) in zip(files,results):
|
for (test,pyop, top), (result, status) in zip(files,results):
|
||||||
if result == "ok":
|
if result == "ok":
|
||||||
result = None
|
result = None
|
||||||
elif result == "skip":
|
elif result == "skip":
|
||||||
|
|
Loading…
Reference in New Issue
Block a user