autopep8
authorLaurent Peuch <cortex@worlddomination.be>
Tue, 17 Dec 2019 21:21:55 +0100
changeset 12824 bc623a3e44e9
parent 12823 e830ace445bf
child 12825 71a842bdf81d
autopep8
cubicweb/devtools/qunit.py
cubicweb/devtools/test/unittest_qunit.py
--- a/cubicweb/devtools/qunit.py	Tue Dec 17 18:04:02 2019 +0100
+++ b/cubicweb/devtools/qunit.py	Tue Dec 17 21:21:55 2019 +0100
@@ -15,7 +15,8 @@
 #
 # You should have received a copy of the GNU Lesser General Public License along
 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
-import os, os.path as osp
+import os
+import os.path as osp
 import time
 import errno
 import shutil
@@ -92,7 +93,7 @@
 
     def stop(self):
         if self._process is not None and self._process.poll() is None:
-            assert self._process.returncode is None,  self._process.returncode
+            assert self._process.returncode is None, self._process.returncode
             self._process.terminate()
             self._process.wait()
             assert self._process.returncode == 0, "Error: firefox return code is %s, see %s" %\
@@ -114,6 +115,7 @@
     def setUp(self):
         super(QUnitTestCase, self).setUp()
         self.test_queue = Queue()
+
         class MyQUnitResultController(QUnitResultController):
             tc = self
             test_queue = self.test_queue
@@ -193,10 +195,9 @@
 
     __regid__ = 'qunit_result'
 
-
     # Class variables to circumvent the instantiation of a new Controller for each request.
-    _log_stack = [] # store QUnit log messages
-    _current_module_name = '' # store the current QUnit module name
+    _log_stack = []  # store QUnit log messages
+    _current_module_name = ''  # store the current QUnit module name
 
     def publish(self, rset=None):
         event = self._cw.form['event']
@@ -207,7 +208,7 @@
         self.__class__._current_module_name = self._cw.form.get('name', '')
 
     def handle_test_done(self):
-        name = '%s // %s' %  (self._current_module_name, self._cw.form.get('name', ''))
+        name = '%s // %s' % (self._current_module_name, self._cw.form.get('name', ''))
         failures = int(self._cw.form.get('failures', 0))
         total = int(self._cw.form.get('total', 0))
 
--- a/cubicweb/devtools/test/unittest_qunit.py	Tue Dec 17 18:04:02 2019 +0100
+++ b/cubicweb/devtools/test/unittest_qunit.py	Tue Dec 17 21:21:55 2019 +0100
@@ -6,15 +6,15 @@
 def js(name):
     return '/static/js_examples/' + name
 
+
 class QUnitTestCaseTC(qunit.QUnitTestCase):
 
     timeout_error = SkipTest
     all_js_tests = (
-                    (js('test_simple_success.js'),),
-                    (js('test_with_dep.js'), (js('dep_1.js'),)),
-                    (js('test_with_ordered_deps.js'), (js('dep_1.js'), js('deps_2.js'),)),
-                   )
-
+        (js('test_simple_success.js'),),
+        (js('test_with_dep.js'), (js('dep_1.js'),)),
+        (js('test_with_ordered_deps.js'), (js('dep_1.js'), js('deps_2.js'),)),
+    )
 
     def test_simple_failure(self):
         js_tests = list(self._test_qunit(js('test_simple_failure.js')))