deb-python-lesscpy/test/__main__.py
Sascha Peilicke a556030931 Move tests to root dir
In essence, tests are not an importable submodule anymore but an
independent piece of code that won't be installed in a user's
site-packages directory.
2014-02-02 13:28:58 +01:00

26 lines
557 B
Python

"""
LessCss tests
"""
import unittest
import os
import re
import bootstrap
def find():
svn = re.compile('\.svn')
test = re.compile('test.+\.py$')
alltests = unittest.TestSuite()
for path, _, files in os.walk(bootstrap.here):
if svn.search(path):
continue
for f in files:
if test.search(f):
module = __import__(f.split('.')[0])
alltests.addTest(unittest.findTestCases(module))
return alltests
if __name__ == '__main__':
unittest.main(defaultTest='find')