a556030931
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.
26 lines
557 B
Python
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')
|