From f71f1102eea9b095c001d8ea918660c9756873a5 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 25 Apr 2010 05:59:02 +1200 Subject: Replace hardcoded list of tests with some introspection. --- testit | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'testit') diff --git a/testit b/testit index f38d34a..c0496bb 100755 --- a/testit +++ b/testit @@ -92,11 +92,11 @@ class TwoHardlinksToSameContent(TestCase): def main(): - klasses = [ - DifferentFiles, - TwoIdenticalFiles, - TwoHardlinksToSameContent, - ] + klasses = [o + for name, o in globals().iteritems() + if type(o) == type(object) and + issubclass(o, TestCase) and + o != TestCase] for klass in klasses: test = klass() test.setUp() -- cgit v1.2.1