Skip to content

Commit

Permalink
flake8 configuration + fixes + tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrDlouhy committed Feb 9, 2016
1 parent 8cb2da9 commit bb83944
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
language: python
install:
- pip install flake8
- pip install coveralls coverage
- pip install -q "$DJANGO"
before_script:
- flake8
- python setup.py install
script:
- coverage run manage.py test
Expand Down
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
max-line-length = 180
exclude = env/*,*/migrations/*,*/static/*
max-complexity = 10
3 changes: 2 additions & 1 deletion tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from django.test import TestCase
from django.core.exceptions import ValidationError


class DjangoGpxPyTests(TestCase):
def test_gpx_parsing(self):
"""
Expand All @@ -17,4 +18,4 @@ def test_bad_file_parsing(self):
"""
with self.assertRaises(ValidationError):
with open("tests/test_data/test_bad_file.gpx", "r") as f:
multilinestring = parse_gpx(f)
parse_gpx(f)

0 comments on commit bb83944

Please sign in to comment.