summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRémi Cardona <remi.cardona@free.fr>2014-09-17 23:34:31 +0200
committerRémi Cardona <remi.cardona@free.fr>2014-09-17 23:34:31 +0200
commit30937b08ed70f51fa5785b419bda47f122157c3c (patch)
tree072cf154c24de1ae151d20093ca9a3cc64a140c3 /test
parentac2d15727c079fbc1d3fe6a606feef9c1179d2ce (diff)
downloadlogilab-common-30937b08ed70f51fa5785b419bda47f122157c3c.tar.gz
[py3k] print function
Requires python >= 2.6.
Diffstat (limited to 'test')
-rw-r--r--test/unittest_testlib.py6
-rw-r--r--test/utils.py11
2 files changed, 10 insertions, 7 deletions
diff --git a/test/unittest_testlib.py b/test/unittest_testlib.py
index f83e1f2..59e736d 100644
--- a/test/unittest_testlib.py
+++ b/test/unittest_testlib.py
@@ -17,6 +17,8 @@
# with logilab-common. If not, see <http://www.gnu.org/licenses/>.
"""unittest module for logilab.comon.testlib"""
+from __future__ import print_function
+
import os
import sys
from os.path import join, dirname, isdir, isfile, abspath, exists
@@ -709,8 +711,8 @@ class DecoratorTC(TestCase):
not exist : function return by the decorator should \
NOT be the same.' % module)
return
- print 'all modules in %s exist. Could not test %s' % (', '.join(modules),
- sys._getframe().f_code.co_name)
+ print('all modules in %s exist. Could not test %s' % (', '.join(modules),
+ sys._getframe().f_code.co_name))
class TagTC(TestCase):
diff --git a/test/utils.py b/test/utils.py
index f54c179..37e23cc 100644
--- a/test/utils.py
+++ b/test/utils.py
@@ -18,6 +18,7 @@
'''unit tests utilities for ureports
'''
+from __future__ import print_function
from cStringIO import StringIO
from logilab.common.ureports.nodes import *
@@ -31,11 +32,11 @@ class WriterTC:
try:
self.assertMultiLineEqual(got, expected)
except:
- print '**** got for %s' % test_id
- print got
- print '**** while expected'
- print expected
- print '****'
+ print('**** got for %s' % test_id)
+ print(got)
+ print('**** while expected')
+ print(expected)
+ print('****')
raise
def test_section(self):