Cython is used to compile some hot paths into native Python extensions. These hot paths were identified through running ufocompile with the hotshot profiler and then converting file by file to Cython, starting with the "hottest" paths and continuing until returns were deminishing. This means that only a few Python files were converted to Cython. Closes #23 Closes #20 (really this time)
27 lines
647 B
Python
27 lines
647 B
Python
import os
|
|
import glob
|
|
import unittest
|
|
|
|
import robofab.test
|
|
|
|
if __name__ == "__main__":
|
|
testDir = os.path.dirname(robofab.test.__file__)
|
|
testFiles = glob.glob1(testDir, "test_*.py")
|
|
|
|
loader = unittest.TestLoader()
|
|
suites = []
|
|
for fileName in testFiles:
|
|
modName = "robofab.test." + fileName[:-3]
|
|
print "importing", fileName
|
|
try:
|
|
mod = __import__(modName, {}, {}, ["*"])
|
|
except ImportError:
|
|
print "*** skipped", fileName
|
|
continue
|
|
|
|
suites.append(loader.loadTestsFromModule(mod))
|
|
|
|
print "running tests..."
|
|
testRunner = unittest.TextTestRunner(verbosity=0)
|
|
testSuite = unittest.TestSuite(suites)
|
|
testRunner.run(testSuite)
|