2 # -*- coding: utf-8 -*-
8 # suppress some deprecation warnings in squeeze related to apt_pkg,
9 # debian, and md5 modules
10 warnings.filterwarnings('ignore', \
11 "Attribute '.*' of the 'apt_pkg\.Configuration' object is deprecated, use '.*' instead\.", \
13 warnings.filterwarnings('ignore', \
14 "apt_pkg\.newConfiguration\(\) is deprecated\. Use apt_pkg\.Configuration\(\) instead\.", \
16 warnings.filterwarnings('ignore', \
17 "please use 'debian' instead of 'debian_bundle'", \
19 warnings.filterwarnings('ignore', \
20 "the md5 module is deprecated; use hashlib instead", \
24 suite = unittest.TestSuite()
25 for _, _, files in os.walk('.'):
26 for name in filter(is_test, files):
27 tests = unittest.defaultTestLoader.loadTestsFromName(name[:-3])
31 def is_test(filename):
32 return filename.startswith('test_') and filename.endswith('.py')
34 if __name__ == "__main__":
35 unittest.main(defaultTest="suite")