Commit 9580a87e authored by Michal Čihař's avatar Michal Čihař

Use print function instead of print statement

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent c61a45f5
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
from __future__ import print_function
# For some reasons, this fails in PyLint sometimes... # For some reasons, this fails in PyLint sometimes...
# pylint: disable=E0611,F0401 # pylint: disable=E0611,F0401
from distutils.version import LooseVersion from distutils.version import LooseVersion
...@@ -209,8 +211,8 @@ def check_version(name, url, version, expected): ...@@ -209,8 +211,8 @@ def check_version(name, url, version, expected):
return False return False
looseversion = LooseVersion(version) looseversion = LooseVersion(version)
if looseversion < expected: if looseversion < expected:
print '*** %s <%s> is too old! ***' % (name, url) print('*** {0} <{1}> is too old! ***'.format(name, url))
print 'Installed version %s, required %s' % (version, expected) print('Installed version {0}, required {1}'.format(version, expected))
return True return True
return False return False
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
Tests for translation models. Tests for translation models.
""" """
from __future__ import print_function
from unittest import SkipTest from unittest import SkipTest
from django.test import TestCase from django.test import TestCase
from django.conf import settings from django.conf import settings
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
from __future__ import print_function
from unittest import SkipTest from unittest import SkipTest
import time import time
import django import django
...@@ -117,7 +118,7 @@ class SeleniumTests(LiveServerTestCase, RegistrationTestMixin): ...@@ -117,7 +118,7 @@ class SeleniumTests(LiveServerTestCase, RegistrationTestMixin):
cls.driver.implicitly_wait(10) cls.driver.implicitly_wait(10)
cls.actions = webdriver.ActionChains(cls.driver) cls.actions = webdriver.ActionChains(cls.driver)
jobid = cls.driver.session_id jobid = cls.driver.session_id
print 'Sauce Labs job: https://saucelabs.com/jobs/{}'.format(jobid) print('Sauce Labs job: https://saucelabs.com/jobs/{}'.format(jobid))
super(SeleniumTests, cls).setUpClass() super(SeleniumTests, cls).setUpClass()
def setUp(self): def setUp(self):
...@@ -258,7 +259,7 @@ class SeleniumTests(LiveServerTestCase, RegistrationTestMixin): ...@@ -258,7 +259,7 @@ class SeleniumTests(LiveServerTestCase, RegistrationTestMixin):
except WebDriverException as error: except WebDriverException as error:
# This usually happens when browser fails to delete some # This usually happens when browser fails to delete some
# of the cookies for whatever reason. # of the cookies for whatever reason.
print 'Ignoring: {0}'.format(error) print('Ignoring: {0}'.format(error))
# Confirm account # Confirm account
self.driver.get(url) self.driver.get(url)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment