devtools: improve qunit timeout message
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Thu, 14 Feb 2013 15:21:23 +0100
changeset 8692 40d4ba3589be
parent 8691 fa1e27a93fb2
child 8693 a6ca96ec8693
devtools: improve qunit timeout message Make the message clearer, shorter and properly wrapped.
devtools/qunit.py
--- a/devtools/qunit.py	Thu Feb 14 14:26:33 2013 +0100
+++ b/devtools/qunit.py	Thu Feb 14 15:21:23 2013 +0100
@@ -189,11 +189,13 @@
                     yield InnerTest(test_name, self.fail, msg)
             except Empty:
                 error = True
-                yield InnerTest(test_file, raise_exception, RuntimeError, "%s did not report execution end. %i test processed so far." % (test_file, test_count))
-
+                msg = '%s inactivity timeout (%is). %i test results received'
+                yield InnerTest(test_file, raise_exception, RuntimeError,
+                                 msg % (test_file, timeout, test_count))
         browser.stop()
         if test_count <= 0 and not error:
-            yield InnerTest(test_name, raise_exception, RuntimeError, 'No test yielded by qunit for %s' % test_file)
+            yield InnerTest(test_name, raise_exception, RuntimeError,
+                            'No test yielded by qunit for %s' % test_file)
 
 class QUnitResultController(Controller):