summaryrefslogtreecommitdiffstats
path: root/ipatests/test_ipalib/test_backend.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2015-08-12 13:44:11 +0200
committerJan Cholasta <jcholast@redhat.com>2015-09-01 11:42:01 +0200
commit8de13bd7dd76f5f5b23d6e4fb84be1a2f1dc5c5e (patch)
treeac6435b79d3e540e907bcc88e3b1c534c2945626 /ipatests/test_ipalib/test_backend.py
parentfb7943dab454f358316160b4baf99075603a162d (diff)
downloadfreeipa-8de13bd7dd76f5f5b23d6e4fb84be1a2f1dc5c5e.tar.gz
freeipa-8de13bd7dd76f5f5b23d6e4fb84be1a2f1dc5c5e.tar.xz
freeipa-8de13bd7dd76f5f5b23d6e4fb84be1a2f1dc5c5e.zip
Use the print function
In Python 3, `print` is no longer a statement. Call it as a function everywhere, and include the future import to remove the statement in Python 2 code as well. Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipatests/test_ipalib/test_backend.py')
-rw-r--r--ipatests/test_ipalib/test_backend.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/ipatests/test_ipalib/test_backend.py b/ipatests/test_ipalib/test_backend.py
index 756d434e3..f7887bf64 100644
--- a/ipatests/test_ipalib/test_backend.py
+++ b/ipatests/test_ipalib/test_backend.py
@@ -20,6 +20,7 @@
"""
Test the `ipalib.backend` module.
"""
+from __future__ import print_function
# FIXME: Pylint errors
# pylint: disable=no-member
@@ -223,11 +224,11 @@ class test_Executioner(ClassChecker):
# Test that CommandError is raised:
conn = Connection('The connection.', Disconnect('someconn'))
context.someconn = conn
- print str(list(context.__dict__))
+ print(str(list(context.__dict__)))
e = raises(errors.CommandError, o.execute, 'nope')
assert e.name == 'nope'
assert conn.disconnect.called is True # Make sure destroy_context() was called
- print str(list(context.__dict__))
+ print(str(list(context.__dict__)))
assert list(context.__dict__) == []
# Test with echo command:
@@ -239,10 +240,10 @@ class test_Executioner(ClassChecker):
conn = Connection('The connection.', Disconnect('someconn'))
context.someconn = conn
- print o.execute('echo', arg1, arg2, **options)
- print dict(
+ print(o.execute('echo', arg1, arg2, **options))
+ print(dict(
result=(arg1, arg2, options)
- )
+ ))
assert o.execute('echo', arg1, arg2, **options) == dict(
result=(arg1, arg2, options)
)