cubicweb/devtools/repotest.py
changeset 11767 432f87a63057
parent 11763 39df042f4ab4
child 11774 51c160677afe
--- a/cubicweb/devtools/repotest.py	Wed Oct 05 15:28:43 2016 +0200
+++ b/cubicweb/devtools/repotest.py	Fri Sep 30 18:25:08 2016 +0200
@@ -1,4 +1,4 @@
-# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2016 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
 #
 # This file is part of CubicWeb.
@@ -21,8 +21,6 @@
 """
 from __future__ import print_function
 
-__docformat__ = "restructuredtext en"
-
 from pprint import pprint
 
 from logilab.common.decorators import cachedproperty
@@ -30,20 +28,23 @@
 
 from cubicweb.devtools.testlib import RepoAccess
 
+
 def tuplify(mylist):
     return [tuple(item) for item in mylist]
 
+
 def snippet_key(a):
     # a[0] may be a dict or a key/value tuple
     return (sorted(dict(a[0]).items()), [e.expression for e in a[1]])
 
+
 def check_plan(self, rql, expected, kwargs=None):
     with self.session.new_cnx() as cnx:
         plan = self._prepare_plan(cnx, rql, kwargs)
         self.planner.build_plan(plan)
         try:
             self.assertEqual(len(plan.steps), len(expected),
-                              'expected %s steps, got %s' % (len(expected), len(plan.steps)))
+                             'expected %s steps, got %s' % (len(expected), len(plan.steps)))
             # step order is important
             for i, step in enumerate(plan.steps):
                 compare_steps(self, step.test_repr(), expected[i])
@@ -51,6 +52,7 @@
             pprint([step.test_repr() for step in plan.steps])
             raise
 
+
 def compare_steps(self, step, expected):
     try:
         self.assertEqual(step[0], expected[0], 'expected step type %s, got %s' % (expected[0], step[0]))