author David Douard <david.douard@logilab.fr>
Fri, 21 Nov 2014 00:50:25 +0100
changeset 1781 37db6358b486
parent 1501 a45f5a997ab2
permissions -rw-r--r--
[recipes] pass the directories of recipes as argument of create_recipes so it's usable as is from other cubes (eg. jpl)


from logilab.common.testlib import TestSuite, TestCase, unittest_main
from unittest_checkers import FileCheckerTest, WRITER

    import cubes.apycot
    from checkers.apycot.jslint import JsLintChecker, JsLintParser

    def load_tests(loader, tests, pattern):
        testsuite = TestSuite()
        addTest = testsuite.addTest
        # JSLint
        js_lint = JsLintChecker(WRITER)
        addTest(FileCheckerTest(js_lint, ['jscript/correct'], 'chks_test_dir_success'))

        addTest(FileCheckerTest(js_lint, ['jscript/bad/',],
        return testsuite

except ImportError:
    class NoTest(TestCase):
        def test(self):
            self.skipTest('install rhino to enable jslint')

if __name__ == '__main__':