[qunit] remove unused 'data_files' parameter
authorJulien Cristau <julien.cristau@logilab.fr>
Thu, 23 Jul 2015 12:32:51 +0200
changeset 10583 97c88aa7c779
parent 10582 bc2f6f0d7433
child 10587 72447be71b48
[qunit] remove unused 'data_files' parameter Its use was removed when we stoppped pointing firefox at file:// web/test/jstests/ajax_url2.html has never actually been used, it's only been ever mentioned in a QUnit comment.
devtools/qunit.py
web/test/jstests/ajax_url2.html
web/test/test_jscript.py
--- a/devtools/qunit.py	Mon Jul 20 13:55:54 2015 +0200
+++ b/devtools/qunit.py	Thu Jul 23 12:32:51 2015 +0200
@@ -122,25 +122,20 @@
 
     def test_javascripts(self):
         for args in self.all_js_tests:
+            self.assertIn(len(args), (1, 2))
             test_file = self.abspath(args[0])
             if len(args) > 1:
                 depends   = [self.abspath(dep) for dep in args[1]]
             else:
                 depends = ()
-            if len(args) > 2:
-                data   = [self.abspath(data) for data in args[2]]
-            else:
-                data = ()
-            for js_test in self._test_qunit(test_file, depends, data):
+            for js_test in self._test_qunit(test_file, depends):
                 yield js_test
 
     @with_tempdir
-    def _test_qunit(self, test_file, depends=(), data_files=(), timeout=10):
+    def _test_qunit(self, test_file, depends=(), timeout=10):
         assert osp.exists(test_file), test_file
         for dep in depends:
             assert osp.exists(dep), dep
-        for data in data_files:
-            assert osp.exists(data), data
 
         QUnitView.test_file = test_file
         QUnitView.depends = depends
--- a/web/test/jstests/ajax_url2.html	Mon Jul 20 13:55:54 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-<div id="ajaxroot">
-  <div class="ajaxHtmlHead">
-    <script src="http://foo.js" type="text/javascript"> </script>
-    <link rel="stylesheet" type="text/css" media="all" href="qunit.css" />
-  </div>
-  <h1>Hello</h1>
-</div>
--- a/web/test/test_jscript.py	Mon Jul 20 13:55:54 2015 +0200
+++ b/web/test/test_jscript.py	Thu Jul 23 12:32:51 2015 +0200
@@ -28,11 +28,6 @@
             "../../web/data/cubicweb.compat.js",
             "../../web/data/cubicweb.htmlhelpers.js",
             "../../web/data/cubicweb.ajax.js",
-            ), (
-            "jstests/ajax_url0.html",
-            "jstests/ajax_url1.html",
-            "jstests/ajax_url2.html",
-            "jstests/ajaxresult.json",
             ),
          ),
     )