Skip to content

Commit 49fb195

Browse files
committed
Python 3 unit test fix
- Fix unit test for get_map on Python 3 by specifying 'byte' data type (also improved alignment and removed superfluous parentheses) - Add Python 3.5 build job on Travis to check for issues with Python 3
1 parent c0a5824 commit 49fb195

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
language: python
22
python:
33
- "2.7"
4+
- "3.5"
45
install:
56
- pip install -r requirements.txt
67
- pip install python-coveralls

tests/test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ def test_get_map(self):
5656
"""Tests the get_map method"""
5757
map_file = os.path.join(os.getcwd(), 'markdown.png')
5858
data = self.loklak.get_map(17.582729, 79.118320)
59-
self.assertTrue(data[:8] == '\211PNG\r\n\032\n' and
60-
(data[12:16] == 'IHDR'))
59+
self.assertTrue(data[:8] == b'\211PNG\r\n\032\n' and
60+
data[12:16] == b'IHDR')
6161
with open(map_file, 'wb') as file_handle:
6262
file_handle.write(data)
6363
with open(map_file, 'rb') as file_handle:

0 commit comments

Comments
 (0)