##// END OF EJS Templates
tests: use absolute_import in /get-with-headers.py...
Gregory Szorc -
r27296:8e86679d default
parent child Browse files
Show More
@@ -3,18 +3,15 b''
3 3 """This does HTTP GET requests given a host:port and path and returns
4 4 a subset of the headers plus the body of the result."""
5 5
6 import httplib, sys
6 from __future__ import absolute_import
7
8 import httplib
9 import json
10 import os
11 import sys
7 12
8 13 try:
9 import json
10 except ImportError:
11 try:
12 import simplejson as json
13 except ImportError:
14 json = None
15
16 try:
17 import msvcrt, os
14 import msvcrt
18 15 msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
19 16 msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)
20 17 except ImportError:
@@ -58,11 +55,6 b' def request(host, path, show):'
58 55 # Pretty print JSON. This also has the beneficial side-effect
59 56 # of verifying emitted JSON is well-formed.
60 57 if formatjson:
61 if not json:
62 print 'no json module not available'
63 print 'did you forget a #require json?'
64 sys.exit(1)
65
66 58 # json.dumps() will print trailing newlines. Eliminate them
67 59 # to make tests easier to write.
68 60 data = json.loads(data)
@@ -145,7 +145,6 b''
145 145 setup.py not using absolute_import
146 146 tests/filterpyflakes.py requires print_function
147 147 tests/generate-working-copy-states.py requires print_function
148 tests/get-with-headers.py not using absolute_import
149 148 tests/get-with-headers.py requires print_function
150 149 tests/heredoctest.py not using absolute_import
151 150 tests/heredoctest.py requires print_function
General Comments 0
You need to be logged in to leave comments. Login now