Skip to content

Commit 3db3a29

Browse files
committed
Merge pull request #8 from apibyexample/carles/add-travis-build
Add a travis CI build
2 parents 4f7f6e5 + 5643161 commit 3db3a29

File tree

6 files changed

+20
-5
lines changed

6 files changed

+20
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/build
12
/dist
23
*.egg-info
34
*.pyc

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
sudo: false
2+
language: python
3+
python:
4+
- 2.7
5+
- 3.3
6+
- 3.4
7+
- 3.5
8+
install: pip install -r test-requirements.txt
9+
script:
10+
- python -m unittest discover || python -m unittest
11+
- flake8 abe

abe/unittest.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from copy import copy
21
import os
32

43
from .mocks import AbeMock
@@ -90,7 +89,6 @@ def assert_data_list_equal(self, data1, data2):
9089
)
9190
raise type(exceptions[0])(message)
9291

93-
9492
def assert_matches_sample(self, path, label, url, response):
9593
"""
9694
Check a URL and response against a sample.

abe/utils.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
_PY3 = sys.version_info >= (3, 0)
55

6+
if _PY3:
7+
unicode = str
8+
69

710
def datetime_to_string(value):
811
representation = value.isoformat()
@@ -22,7 +25,6 @@ def to_unicode(data):
2225
else:
2326
data = str(data)
2427

25-
if not _PY3:
26-
if isinstance(data, str):
27-
data = unicode(data)
28+
if not _PY3 and isinstance(data, str):
29+
data = unicode(data)
2830
return data

test-requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-r requirements.txt
2+
3+
flake8

tests/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)