web/test/test_jscript.py
author Rémi Cardona <remi.cardona@logilab.fr>
Wed, 02 Sep 2015 12:08:31 +0200
changeset 10887 a0315e9f4c20
parent 10583 97c88aa7c779
child 10935 049209b9e9d6
permissions -rw-r--r--
[tests] Don't import QUnitTestCase into tests' global namespace Unittest's test loader will try to execute QUnitTestCase's test_javascripts method. However this class is intended to be subclassed, not to be executed directly. This change has the following consequences: * slightly faster test execution * almost all rtags warnings are gone

from cubicweb.devtools import qunit

from os import path as osp


class JScript(qunit.QUnitTestCase):

    all_js_tests = (
        ("jstests/test_utils.js", (
            "../../web/data/cubicweb.js",
            "../../web/data/cubicweb.compat.js",
            "../../web/data/cubicweb.python.js",
            "jstests/utils.js",
            ),
         ),

        ("jstests/test_htmlhelpers.js", (
            "../../web/data/cubicweb.js",
            "../../web/data/cubicweb.compat.js",
            "../../web/data/cubicweb.python.js",
            "../../web/data/cubicweb.htmlhelpers.js",
            ),
         ),

        ("jstests/test_ajax.js", (
            "../../web/data/cubicweb.python.js",
            "../../web/data/cubicweb.js",
            "../../web/data/cubicweb.compat.js",
            "../../web/data/cubicweb.htmlhelpers.js",
            "../../web/data/cubicweb.ajax.js",
            ),
         ),
    )


if __name__ == '__main__':
    from unittest import main
    main()