Skip to content

Commit a97eb9f

Browse files
authored
Merge pull request #15 from smartfile/fix-testing
Fix CI testing
2 parents ac81946 + 5080b5a commit a97eb9f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,30 @@
1+
.PHONY: test
12
test:
23
coverage run tests.py
34

5+
.PHONY: verify
46
verify:
57
pyflakes smartfile
68
pep8 --ignore=E501,E225 smartfile
79

10+
.PHONY: install
811
install:
912
python setup.py install
1013

14+
.PHONY: publish
1115
publish:
1216
python setup.py register
1317
python setup.py sdist upload
1418

19+
.PHONY: profile
1520
profile:
1621
python profile.py
1722

23+
.PHONY: clean
1824
clean:
1925
find . -name *.pyc -delete
2026

27+
.PHONY: distclean
2128
distclean: clean
2229
rm -rf env
2330

tests.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,9 @@ def test_netrc(self):
303303
address, port = address
304304
else:
305305
port = self.server.server_port
306-
netrc = b"machine 127.0.0.1:%s\n login %s\n password %s" % (
306+
netrc = 'machine 127.0.0.1:%i\n login %s\n password %s' % (
307307
port, API_KEY, API_PASSWORD)
308+
netrc = netrc.encode('utf8')
308309
os.write(fd, netrc)
309310
finally:
310311
os.close(fd)
@@ -359,7 +360,7 @@ def respond(self, request):
359360
self.send_response(200)
360361
self.send_header("Content-Type", "application/json")
361362
self.end_headers()
362-
self.wfile.write(b"%s" % (json.dumps({'foo': 'bar'}), ))
363+
self.wfile.write(json.dumps({'foo': 'bar'}).encode('utf8'))
363364

364365

365366
class JSONTestCase(object):

0 commit comments

Comments
 (0)