bpo-30822: regrtest: fix -u extralargefile (#2788)
Fix also regrtest command line parser to allow passing -u
extralargefile to run test_zipfile64.
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index fc4681f..7a48475 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -250,9 +250,15 @@
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 @@
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] == '-':