From 80ebc438ed377f8c6491e8887425526c6787c0e7 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 21 Jul 2017 02:12:14 +0200 Subject: [PATCH] bpo-30822: regrtest: fix -u extralargefile (#2788) Fix also regrtest command line parser to allow passing -u extralargefile to run test_zipfile64. --- Lib/test/regrtest.py | 14 ++++++++++---- .../Tests/2017-07-20-14-29-54.bpo-30822.X0wREo.rst | 2 ++ 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 Misc/NEWS.d/next/Tests/2017-07-20-14-29-54.bpo-30822.X0wREo.rst diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index fc4681f041..7a48475ee8 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -250,9 +250,15 @@ PROGRESS_UPDATE = 30.0 # seconds from test import test_support -RESOURCE_NAMES = ('audio', 'curses', 'largefile', 'network', 'bsddb', - 'decimal', 'cpu', 'subprocess', 'urlfetch', 'gui', - 'xpickle') +ALL_RESOURCES = ('audio', 'curses', 'largefile', 'network', 'bsddb', + 'decimal', 'cpu', 'subprocess', 'urlfetch', 'gui', + 'xpickle') + +# Other resources excluded from --use=all: +# +# - extralagefile (ex: test_zipfile64): really too slow to be enabled +# "by default" +RESOURCE_NAMES = ALL_RESOURCES + ('extralargefile',) TEMPDIR = os.path.abspath(tempfile.gettempdir()) @@ -420,7 +426,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, u = [x.lower() for x in a.split(',')] for r in u: if r == 'all': - use_resources[:] = RESOURCE_NAMES + use_resources[:] = ALL_RESOURCES continue remove = False if r[0] == '-': diff --git a/Misc/NEWS.d/next/Tests/2017-07-20-14-29-54.bpo-30822.X0wREo.rst b/Misc/NEWS.d/next/Tests/2017-07-20-14-29-54.bpo-30822.X0wREo.rst new file mode 100644 index 0000000000..ee0cf02c70 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2017-07-20-14-29-54.bpo-30822.X0wREo.rst @@ -0,0 +1,2 @@ +Fix regrtest command line parser to allow passing -u extralargefile to +run test_zipfile64. -- 2.50.1