mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-05 04:50:09 +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 = []
|
||||
failed = []
|
||||
|
||||
_temproot = tempfile.mkdtemp(prefix='pillow-tests')
|
||||
|
||||
ignore_re = re.compile('^ignore: (.*)$', re.MULTILINE)
|
||||
|
||||
def test_one(params):
|
||||
|
@ -96,6 +98,8 @@ def main():
|
|||
success = failure = 0
|
||||
skipped = []
|
||||
|
||||
tester_options.append(_temproot)
|
||||
|
||||
python_options = " ".join(python_options)
|
||||
tester_options = " ".join(tester_options)
|
||||
|
||||
|
@ -130,9 +134,7 @@ def main():
|
|||
|
||||
print("-"*68)
|
||||
|
||||
#UNDONE -- this is wrong
|
||||
temp_root = os.path.join(tempfile.gettempdir(), 'pillow-tests')
|
||||
tempfiles = glob.glob(os.path.join(temp_root, "temp_*"))
|
||||
tempfiles = glob.glob(os.path.join(_temproot, "temp_*"))
|
||||
if tempfiles:
|
||||
print("===", "remaining temporary files")
|
||||
for file in tempfiles:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
from __future__ import print_function
|
||||
import tempfile
|
||||
import os
|
||||
|
||||
# require that deprecation warnings are triggered
|
||||
import warnings
|
||||
|
@ -19,7 +20,10 @@ py3 = (sys.version_info >= (3, 0))
|
|||
|
||||
_target = None
|
||||
_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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user