diff test/test_templating.py @ 5376:64b05e24dbd8

Python 3 preparation: convert print to a function. Tool-assisted patch. It is possible that some "from __future__ import print_function" are not in fact needed, if a file only uses print() with a single string as an argument and so would work fine in Python 2 without that import.
author Joseph Myers <jsm@polyomino.org.uk>
date Tue, 24 Jul 2018 09:54:52 +0000
parents 578e86e015f9
children 35ea9b1efc14
line wrap: on
line diff
--- a/test/test_templating.py	Sat Jul 21 23:07:16 2018 +1000
+++ b/test/test_templating.py	Tue Jul 24 09:54:52 2018 +0000
@@ -1,3 +1,4 @@
+from __future__ import print_function
 import unittest
 from cgi import FieldStorage, MiniFieldStorage
 
@@ -148,7 +149,7 @@
         otks=self.client.db.getOTKManager()
 
         for test in [ 'module', 'template', 'default_time' ]:
-            print "Testing:", test
+            print("Testing:", test)
             
             if test == 'module':
                 # test the module function
@@ -177,8 +178,8 @@
 
             now = time.time()
 
-            print "now, timestamp, greater, difference", \
-                     now, timestamp, greater_than, now - timestamp
+            print("now, timestamp, greater, difference",
+                  now, timestamp, greater_than, now - timestamp)
 
         
             # lower bound of the difference is above. Upper bound

Roundup Issue Tracker: http://roundup-tracker.org/