equal
deleted
inserted
replaced
14 # details. |
14 # details. |
15 # |
15 # |
16 # You should have received a copy of the GNU Lesser General Public License along |
16 # You should have received a copy of the GNU Lesser General Public License along |
17 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
17 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
18 """this module contains base classes and utilities for cubicweb tests""" |
18 """this module contains base classes and utilities for cubicweb tests""" |
|
19 from __future__ import print_function |
|
20 |
19 __docformat__ = "restructuredtext en" |
21 __docformat__ = "restructuredtext en" |
20 |
22 |
21 import sys |
23 import sys |
22 import re |
24 import re |
23 import urlparse |
25 import urlparse |
1162 for rql, args in q: |
1164 for rql, args in q: |
1163 try: |
1165 try: |
1164 cnx.execute(rql, args) |
1166 cnx.execute(rql, args) |
1165 except ValidationError as ex: |
1167 except ValidationError as ex: |
1166 # failed to satisfy some constraint |
1168 # failed to satisfy some constraint |
1167 print 'error in automatic db population', ex |
1169 print('error in automatic db population', ex) |
1168 cnx.commit_state = None # reset uncommitable flag |
1170 cnx.commit_state = None # reset uncommitable flag |
1169 self.post_populate(cnx) |
1171 self.post_populate(cnx) |
1170 |
1172 |
1171 def iter_individual_rsets(self, etypes=None, limit=None): |
1173 def iter_individual_rsets(self, etypes=None, limit=None): |
1172 etypes = etypes or self.to_test_etypes() |
1174 etypes = etypes or self.to_test_etypes() |