diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-07-20 15:46:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-20 15:46:32 +0200 |
commit | 5b392bbaeb9d9b1db961ecfc7315d8c8662c27f6 (patch) | |
tree | fbc9cd59b265cb5ef5f341955e476ce2908956c0 /Lib/test/test_regrtest.py | |
parent | Update doc download files size estimates. (#2771) (diff) | |
download | cpython-5b392bbaeb9d9b1db961ecfc7315d8c8662c27f6.tar.gz cpython-5b392bbaeb9d9b1db961ecfc7315d8c8662c27f6.tar.bz2 cpython-5b392bbaeb9d9b1db961ecfc7315d8c8662c27f6.zip |
bpo-30822: Exclude tzdata from regrtest --all (#2775)
When running the test suite using --use=all / -u all, exclude tzdata
since it makes test_datetime too slow (15-20 min on some buildbots)
which then times out on some buildbots.
-u tzdata must now be enabled explicitly, -u tzdata or -u all,tzdata,
to run all test_datetime tests.
Fix also regrtest command line parser to allow passing -u
extralargefile to run test_zipfile64.
Travis CI: remove -tzdata. Replace -u all,-tzdata,-cpu with -u all,-cpu since tzdata is now excluded from -u all.
Diffstat (limited to 'Lib/test/test_regrtest.py')
-rw-r--r-- | Lib/test/test_regrtest.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py index a544f880d2b..f63ed647f80 100644 --- a/Lib/test/test_regrtest.py +++ b/Lib/test/test_regrtest.py @@ -191,15 +191,26 @@ class ParseArgsTestCase(unittest.TestCase): with self.subTest(opt=opt): ns = libregrtest._parse_args([opt, 'gui,network']) self.assertEqual(ns.use_resources, ['gui', 'network']) + ns = libregrtest._parse_args([opt, 'gui,none,network']) self.assertEqual(ns.use_resources, ['network']) - expected = list(libregrtest.RESOURCE_NAMES) + + expected = list(libregrtest.ALL_RESOURCES) expected.remove('gui') ns = libregrtest._parse_args([opt, 'all,-gui']) self.assertEqual(ns.use_resources, expected) self.checkError([opt], 'expected one argument') self.checkError([opt, 'foo'], 'invalid resource') + # all + a resource not part of "all" + ns = libregrtest._parse_args([opt, 'all,tzdata']) + self.assertEqual(ns.use_resources, + list(libregrtest.ALL_RESOURCES) + ['tzdata']) + + # test another resource which is not part of "all" + ns = libregrtest._parse_args([opt, 'extralargefile']) + self.assertEqual(ns.use_resources, ['extralargefile']) + def test_memlimit(self): for opt in '-M', '--memlimit': with self.subTest(opt=opt): |