]> git.decadent.org.uk Git - dak.git/blob - tests/test_imports.py
Merge remote branch 'mhy/master' into merge
[dak.git] / tests / test_imports.py
1 #!/usr/bin/env python
2
3 from base_test import DakTestCase, DAK_ROOT_DIR
4
5 import glob
6 import unittest
7
8 from os.path import join, basename, splitext
9
10 class ImportTestCase(DakTestCase):
11     for filename in glob.glob(join(DAK_ROOT_DIR, 'dak', '*.py')):
12         cmd, ext = splitext(basename(filename))
13
14         def test_fn(self, cmd=cmd):
15             __import__('dak', fromlist=[cmd])
16
17         locals()['test_importing_%s' % cmd] = test_fn
18
19 if __name__ == '__main__':
20     unittest.main()