[Python-checkins] r74587 - python/branches/py3k/Lib/importlib/test/regrtest.py
brett.cannon
python-checkins at python.org
Sun Aug 30 10:30:35 CEST 2009
Author: brett.cannon
Date: Sun Aug 30 10:30:35 2009
New Revision: 74587
Log:
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).
Modified:
python/branches/py3k/Lib/importlib/test/regrtest.py
Modified: python/branches/py3k/Lib/importlib/test/regrtest.py
==============================================================================
--- python/branches/py3k/Lib/importlib/test/regrtest.py (original)
+++ python/branches/py3k/Lib/importlib/test/regrtest.py Sun Aug 30 10:30:35 2009
@@ -25,9 +25,11 @@
'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)
More information about the Python-checkins
mailing list