beets/test/alltests.py
adrian.sampson cd124d2dad new tests for DB and file operations
Also, new organization for tests and automatic loader. Fixed bugs uncovered by new tests.

--HG--
extra : convert_revision : svn%3A41726ec3-264d-0410-9c23-a9f1637257cc/trunk%4069
2008-07-07 05:23:17 +00:00

16 lines
No EOL
417 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')