summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/test
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2009-08-30 08:30:35 (GMT)
committerBrett Cannon <bcannon@gmail.com>2009-08-30 08:30:35 (GMT)
commit6cc8310ded4323a593c8beffef101c8de895629e (patch)
treee5ac7fcc7e4d19f68e6110660851c076cfdd9391 /Lib/importlib/test
parent757df6e4cd0578ed86db188a2331a4e83764c42c (diff)
downloadcpython-6cc8310ded4323a593c8beffef101c8de895629e.zip
cpython-6cc8310ded4323a593c8beffef101c8de895629e.tar.gz
cpython-6cc8310ded4323a593c8beffef101c8de895629e.tar.bz2
Tweak importlib.test.regrtest to only specify the implicit tests to exclude
when running entire test suite. Allows normal command-line arguments normally given to test.regrtest to work (e.g. specifying a single test).
Diffstat (limited to 'Lib/importlib/test')
-rw-r--r--Lib/importlib/test/regrtest.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/importlib/test/regrtest.py b/Lib/importlib/test/regrtest.py
index 2988d74..7010165 100644
--- a/Lib/importlib/test/regrtest.py
+++ b/Lib/importlib/test/regrtest.py
@@ -25,9 +25,11 @@ if __name__ == '__main__':
'test_pkg', # Does not expect __loader__ attribute
'test_pydoc', # Does not expect __loader__ attribute
]
- # No programmatic way to specify tests to exclude
- sys.argv.extend(exclude)
- # verbose=True, quiet=False for all failure info
- # tests=[...] for specific tests to run
+ # Switching on --exclude implies running all test but the ones listed, so
+ # only use it when one is not running an explicit test
+ if len(sys.argv) == 1:
+ # No programmatic way to specify tests to exclude
+ sys.argv.extend(exclude)
+
regrtest.main(quiet=True)