# HG changeset patch # User Dirkjan Ochtman # Date 1244712877 -7200 # Node ID d70c8e45cb9e12de46968b8debeaf05a6528813a # Parent e857e5cfc10fdbea197038e7b54d398717a6d2c8 tests: add -A option to run.py for running comprehensive tests diff --git a/tests/comprehensive/__init__.py b/tests/comprehensive/__init__.py new file mode 100644 --- /dev/null +++ b/tests/comprehensive/__init__.py @@ -0,0 +1,1 @@ +# make this a package diff --git a/tests/run.py b/tests/run.py --- a/tests/run.py +++ b/tests/run.py @@ -25,6 +25,12 @@ import test_tags import test_utility_commands import test_urls +from comprehensive import test_stupid_pull + +def comprehensive(mod): + dir = os.path.basename(os.path.dirname(mod.__file__)) + return dir == 'comprehensive' + if __name__ == '__main__': kwargs = {'descriptions': 2} @@ -43,7 +49,9 @@ if __name__ == '__main__': args = [i.split('.py')[0].replace('-', '_') for i in args] if not args: - suite = [i[1].suite() for i in sorted(all.iteritems())] + check = lambda x: '-A' in sys.argv or not comprehensive(x) + mods = [m for (n, m) in sorted(all.iteritems()) if check(m)] + suite = [m.suite() for m in mods] else: suite = [] for arg in args: