##// END OF EJS Templates
tests: fix simple heredoc print statements to work on Py3...
Augie Fackler -
r33686:27fb986e default
parent child Browse files
Show More
@@ -31,11 +31,11 b' should be used from d74fc8dec2b4 onward '
31 31 > input = stringio()
32 32 >
33 33 > def startrsp(status, headers):
34 > print '---- STATUS'
35 > print status
36 > print '---- HEADERS'
37 > print [i for i in headers if i[0] != 'ETag']
38 > print '---- DATA'
34 > print('---- STATUS')
35 > print(status)
36 > print('---- HEADERS')
37 > print([i for i in headers if i[0] != 'ETag'])
38 > print('---- DATA')
39 39 > return output.write
40 40 >
41 41 > env = {
@@ -59,8 +59,8 b' should be used from d74fc8dec2b4 onward '
59 59 > sys.stdout.write(output.getvalue())
60 60 > sys.stdout.write(''.join(content))
61 61 > getattr(content, 'close', lambda : None)()
62 > print '---- ERRORS'
63 > print errors.getvalue()
62 > print('---- ERRORS')
63 > print(errors.getvalue())
64 64 >
65 65 > output = stringio()
66 66 > env['QUERY_STRING'] = 'style=atom'
@@ -31,11 +31,11 b' should be used from d74fc8dec2b4 onward '
31 31 > input = stringio()
32 32 >
33 33 > def startrsp(status, headers):
34 > print '---- STATUS'
35 > print status
36 > print '---- HEADERS'
37 > print [i for i in headers if i[0] != 'ETag']
38 > print '---- DATA'
34 > print('---- STATUS')
35 > print(status)
36 > print('---- HEADERS')
37 > print([i for i in headers if i[0] != 'ETag'])
38 > print('---- DATA')
39 39 > return output.write
40 40 >
41 41 > env = {
@@ -58,8 +58,8 b' should be used from d74fc8dec2b4 onward '
58 58 > sys.stdout.write(output.getvalue())
59 59 > sys.stdout.write(''.join(content))
60 60 > getattr(content, 'close', lambda : None)()
61 > print '---- ERRORS'
62 > print errors.getvalue()
61 > print('---- ERRORS')
62 > print(errors.getvalue())
63 63 >
64 64 > output = stringio()
65 65 > env['PATH_INFO'] = '/'
@@ -41,11 +41,11 b' by the WSGI standard and strictly implem'
41 41 > output = stringio()
42 42 >
43 43 > def startrsp(status, headers):
44 > print '---- STATUS'
45 > print status
46 > print '---- HEADERS'
47 > print [i for i in headers if i[0] != 'ETag']
48 > print '---- DATA'
44 > print('---- STATUS')
45 > print(status)
46 > print('---- HEADERS')
47 > print([i for i in headers if i[0] != 'ETag'])
48 > print('---- DATA')
49 49 > return output.write
50 50 >
51 51 > env = {
@@ -68,13 +68,13 b' by the WSGI standard and strictly implem'
68 68 > i = hgweb('.')
69 69 > for c in i(env, startrsp):
70 70 > pass
71 > print '---- ERRORS'
72 > print errors.getvalue()
73 > print '---- OS.ENVIRON wsgi variables'
74 > print sorted([x for x in os.environ if x.startswith('wsgi')])
75 > print '---- request.ENVIRON wsgi variables'
71 > print('---- ERRORS')
72 > print(errors.getvalue())
73 > print('---- OS.ENVIRON wsgi variables')
74 > print(sorted([x for x in os.environ if x.startswith('wsgi')]))
75 > print('---- request.ENVIRON wsgi variables')
76 76 > with i._obtainrepo() as repo:
77 > print sorted([x for x in repo.ui.environ if x.startswith('wsgi')])
77 > print(sorted([x for x in repo.ui.environ if x.startswith('wsgi')]))
78 78 > EOF
79 79 $ $PYTHON request.py
80 80 ---- STATUS
@@ -4,7 +4,7 b''
4 4 > import sys
5 5 > for entry in sys.stdin.read().split('\n'):
6 6 > if entry:
7 > print entry.split('\x00')[0]
7 > print(entry.split('\x00')[0])
8 8 > EOF
9 9
10 10 $ echo "[extensions]" >> $HGRCPATH
General Comments 0
You need to be logged in to leave comments. Login now