cubicweb/web/test/test_jscript.py
author Denis Laxalde <denis.laxalde@logilab.fr>
Fri, 18 Nov 2016 10:28:41 +0100
changeset 11850 87443f279b0f
parent 11057 0b59724cb3f2
permissions -rw-r--r--
[devtools] Make timeout error in qunit tests configurable and use SkipTest in test_jscript.py The reason is that the latter tests quite often fail in our CI environment, possibly due to concurrent execution of the browser, and this makes it hard to identify a truly failing build there. So skip tests with a timeout error.

from unittest import SkipTest

from cubicweb.devtools import qunit

from os import path as osp


class JScript(qunit.QUnitTestCase):

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

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

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


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