List examples in the init file.

This commit is contained in:
Rowan Cockett
2016-01-02 18:29:04 -08:00
parent a18d48348d
commit d64fd4ae35
2 changed files with 8 additions and 6 deletions
+1 -3
View File
@@ -10,10 +10,8 @@ def get(test):
self.assertTrue(True)
return func
attrs = dict()
tests = [_ for _ in dir(Examples) if not _.startswith('_')]
for test in tests:
for test in Examples.__examples__:
attrs['test_'+test] = get(test)
del get, tests, _
TestExamples = type('TestExamples', (unittest.TestCase,), attrs)