Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

Commit 9db17b0

Browse files
committed
Clean pip installs
1 parent f57c0da commit 9db17b0

File tree

3 files changed

+35
-24
lines changed

3 files changed

+35
-24
lines changed

.circleci/config.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: 2
2+
jobs:
3+
build:
4+
working_directory: ~/circleci-working-dir
5+
docker:
6+
- image: circleci/python:2.7.13
7+
# - image: circleci/python:3.6.2
8+
steps:
9+
- checkout
10+
- run:
11+
command: |
12+
sudo python -m pip install --upgrade pip setuptools wheel
13+
sudo python -m pip install --upgrade pep8 pyflakes coverage tox
14+
sudo python -m pip install --upgrade virtualenv==12.0.2
15+
- run:
16+
command: |
17+
tox -e py27,py350,pep8,pyflakes,coverage
18+
sudo python setup.py develop
19+
- deploy:
20+
name: Push coverage
21+
command: |
22+
if [ "${CIRCLE_BRANCH}" == "master" ]; then
23+
tox -e upload_coverage
24+
fi

circle.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

tests/tests.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,20 @@ def file_get_contents(filename):
1717
with open(filename) as f:
1818
return f.read()
1919

20+
def to_utf8(d):
21+
if type(d) is dict:
22+
result = {}
23+
for key, value in d.items():
24+
result[to_utf8(key)] = to_utf8(value)
25+
elif type(d) is unicode:
26+
return d.encode('utf8')
27+
else:
28+
return d
29+
2030
json_content = file_get_contents(expected_filename)
2131
expected = json.loads(json_content)
2232

23-
self.assertEqual(generated, expected)
33+
self.assertEqual(to_utf8(generated), to_utf8(expected))
2434

2535
def test_parser_coverage3(self):
2636
self.maxDiff = None

0 commit comments

Comments
 (0)