]> git.decadent.org.uk Git - dak.git/blob - tests/test_all.py
Cnf[...] changed to cnf[...] in override.py
[dak.git] / tests / test_all.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 import os
5 import unittest
6
7 def suite():
8     suite = unittest.TestSuite()
9     for _, _, files in os.walk('.'):
10         for name in filter(is_test, files):
11             tests = unittest.defaultTestLoader.loadTestsFromName(name[:-3])
12             suite.addTests(tests)
13     return suite
14
15 def is_test(filename):
16     return filename.startswith('test_') and filename.endswith('.py')
17
18 if __name__ == "__main__":
19     unittest.main(defaultTest="suite")