Skip to content

Add Travis-CI #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
sudo: false

addons:
apt:
packages:
- dos2unix

language: python

python:
- "2.6"
- "2.7"
- "3.2"
- "3.3"
- "3.4"
- "3.5"


install:
- dos2unix README.txt
- pip install .

script: python shapefile.py
3 changes: 2 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,9 @@ The blockgroup key and population count:
There is also an iterShapeRecords() method to iterate through large files:

>>> shapeRecs = sf.iterShapeRecords()
>>> for shape, rec in shapeRecs:
>>> for shapeRec in shapeRecs:
... # do something here
... pass

Writing Shapefiles
++++++++++++++++++
Expand Down
7 changes: 5 additions & 2 deletions shapefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,8 @@ def __fieldNorm(self, fieldName):
def test():
import doctest
doctest.NORMALIZE_WHITESPACE = 1
doctest.testfile("README.txt", verbose=1)
failure_count, test_count = doctest.testfile("README.txt", verbose=1)
return failure_count

if __name__ == "__main__":
"""
Expand All @@ -1192,4 +1193,6 @@ def test():
testing libraries but for now unit testing is done using what's available in
2.3.
"""
test()
failure_count = test()
sys.exit(failure_count)