mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-05 21:10:11 +03:00
Pass the tempdir through to the tester from the bulk runner
This commit is contained in:
parent
a2428f24bd
commit
5e077e0414
|
@ -27,6 +27,8 @@ include = [x for x in sys.argv[1:] if x[:2] != "--"]
|
||||||
skipped = []
|
skipped = []
|
||||||
failed = []
|
failed = []
|
||||||
|
|
||||||
|
_temproot = tempfile.mkdtemp(prefix='pillow-tests')
|
||||||
|
|
||||||
ignore_re = re.compile('^ignore: (.*)$', re.MULTILINE)
|
ignore_re = re.compile('^ignore: (.*)$', re.MULTILINE)
|
||||||
|
|
||||||
def test_one(params):
|
def test_one(params):
|
||||||
|
@ -96,6 +98,8 @@ def main():
|
||||||
success = failure = 0
|
success = failure = 0
|
||||||
skipped = []
|
skipped = []
|
||||||
|
|
||||||
|
tester_options.append(_temproot)
|
||||||
|
|
||||||
python_options = " ".join(python_options)
|
python_options = " ".join(python_options)
|
||||||
tester_options = " ".join(tester_options)
|
tester_options = " ".join(tester_options)
|
||||||
|
|
||||||
|
@ -130,9 +134,7 @@ def main():
|
||||||
|
|
||||||
print("-"*68)
|
print("-"*68)
|
||||||
|
|
||||||
#UNDONE -- this is wrong
|
tempfiles = glob.glob(os.path.join(_temproot, "temp_*"))
|
||||||
temp_root = os.path.join(tempfile.gettempdir(), 'pillow-tests')
|
|
||||||
tempfiles = glob.glob(os.path.join(temp_root, "temp_*"))
|
|
||||||
if tempfiles:
|
if tempfiles:
|
||||||
print("===", "remaining temporary files")
|
print("===", "remaining temporary files")
|
||||||
for file in tempfiles:
|
for file in tempfiles:
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
import tempfile
|
import tempfile
|
||||||
|
import os
|
||||||
|
|
||||||
# require that deprecation warnings are triggered
|
# require that deprecation warnings are triggered
|
||||||
import warnings
|
import warnings
|
||||||
|
@ -19,7 +20,10 @@ py3 = (sys.version_info >= (3, 0))
|
||||||
|
|
||||||
_target = None
|
_target = None
|
||||||
_tempfiles = []
|
_tempfiles = []
|
||||||
_temproot = tempfile.mkdtemp(prefix='pillow-tests')
|
if 'pillow-tests' in sys.argv[-1] and os.path.exists(sys.argv[-1]):
|
||||||
|
_temproot = sys.argv[-1]
|
||||||
|
else:
|
||||||
|
_temproot = tempfile.mkdtemp(prefix='pillow-tests')
|
||||||
_logfile = None
|
_logfile = None
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user