running libfuturize.fixes.fix_print_with_import

This commit is contained in:
ilvalle
2016-05-30 21:23:40 +02:00
parent 36ca754c77
commit 48e10a3793
36 changed files with 240 additions and 204 deletions
+8 -7
View File
@@ -15,6 +15,7 @@ mostly for testing purposes
Some examples at the bottom.
"""
from __future__ import print_function
import re
import time
import urllib
@@ -160,7 +161,7 @@ class WebClient(object):
if match:
name = match.group('name')
if name in self.sessions and self.sessions[name] != value:
print RuntimeError('Changed session ID %s' % name)
print(RuntimeError('Changed session ID %s' % name))
self.sessions[name] = value
# find all forms and formkeys in page
@@ -202,13 +203,13 @@ def test_web2py_registration_and_login():
assert 'Welcome Homer' in client.text
# print some variables
print '\nsessions:\n', client.sessions
print '\nheaders:\n', client.headers
print '\ncookies:\n', client.cookies
print '\nforms:\n', client.forms
print
print('\nsessions:\n', client.sessions)
print('\nheaders:\n', client.headers)
print('\ncookies:\n', client.cookies)
print('\nforms:\n', client.forms)
print()
for method, url, status, t in client.history:
print method, url, status, t
print(method, url, status, t)
if __name__ == '__main__':
test_web2py_registration_and_login()