Skip to content

Commit 11f3437

Browse files
committed
Add Travis testing.
1 parent fa8df8b commit 11f3437

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

.travis.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
language: python
2+
23
python:
3-
- '2.7'
4+
- '2.7'
5+
- '3.3'
6+
- '3.4'
7+
- '3.5'
8+
9+
install:
10+
- pip install .
11+
412
script:
5-
- touch foo
13+
- python shapefile.py
14+
615
deploy:
716
provider: pypi
817
user: jlawhead

shapefile.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,16 +1190,19 @@ def __fieldNorm(self, fieldName):
11901190
fieldName.replace(' ', '_')
11911191

11921192
# Begin Testing
1193-
def test():
1193+
def test(**kwargs):
11941194
import doctest
11951195
doctest.NORMALIZE_WHITESPACE = 1
1196-
doctest.testfile("README.md", verbose=1)
1197-
1196+
verbosity = kwargs.get('verbose', 1)
1197+
failure_count, test_count = doctest.testfile("README.md", verbose=verbosity)
1198+
return failure_count
1199+
11981200
if __name__ == "__main__":
11991201
"""
12001202
Doctests are contained in the file 'README.md'. This library was originally developed
12011203
using Python 2.3. Python 2.4 and above have some excellent improvements in the built-in
12021204
testing libraries but for now unit testing is done using what's available in
12031205
2.3.
12041206
"""
1205-
test()
1207+
failure_count = test()
1208+
sys.exit(failure_count)

0 commit comments

Comments
 (0)