beets/test/testall.py
adrian.sampson 176b14e052 created setup.py and trimmings
--HG--
rename : bts.py => bts
rename : test/alltests.py => test/testall.py
extra : convert_revision : svn%3A41726ec3-264d-0410-9c23-a9f1637257cc/trunk%40130
2009-02-10 00:50:21 +00:00

16 lines
No EOL
418 B
Python
Executable file

#!/usr/bin/env python
import unittest
import os
import re
def suite():
s = unittest.TestSuite()
# get the suite() of every module in this directory begining with test_
for fname in os.listdir('.'):
match = re.match(r'(test_\S+)\.py$', fname)
if match:
s.addTest(__import__(match.group(1)).suite())
return s
if __name__ == '__main__':
unittest.main(defaultTest='suite')