Files
deb-python-lesscpy/test/tst_bootstrap3.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
766 B
Python

"""
bootstrap3 tests.
"""
import unittest
import os
from bootstrap import create_test, TestCase
_less_path = os.path.join(os.path.dirname(__file__), 'bootstrap3', 'less')
_css_path = os.path.join(os.path.dirname(__file__), 'bootstrap3', 'css')
LESS = [os.path.join(_less_path, "%s.less" % f) for f in ["bootstrap", "theme"]]
for less in LESS:
lessf = less.split('.')[0].split('/')[-1]
css = os.path.join(_css_path, lessf + '.css')
mincss = os.path.join(_css_path, lessf + '.min.css')
test_method = create_test((less, css, mincss))
test_method.__name__ = 'test_bootstrap3_%s' % "_".join(reversed(os.path.basename(less).split('.')))
setattr(TestCase, test_method.__name__, test_method)
if __name__ == "__main__":
unittest.main()