Skip to content

Commit 49f15c5

Browse files
authored
Merge pull request #69 from micahcochran/add-travis3
Add Travis testing.
2 parents 6705f54 + 11f3437 commit 49f15c5

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
@@ -1233,16 +1233,19 @@ def __fieldNorm(self, fieldName):
12331233
fieldName.replace(' ', '_')
12341234

12351235
# Begin Testing
1236-
def test():
1236+
def test(**kwargs):
12371237
import doctest
12381238
doctest.NORMALIZE_WHITESPACE = 1
1239-
doctest.testfile("README.md", verbose=1)
1240-
1239+
verbosity = kwargs.get('verbose', 1)
1240+
failure_count, test_count = doctest.testfile("README.md", verbose=verbosity)
1241+
return failure_count
1242+
12411243
if __name__ == "__main__":
12421244
"""
12431245
Doctests are contained in the file 'README.md'. This library was originally developed
12441246
using Python 2.3. Python 2.4 and above have some excellent improvements in the built-in
12451247
testing libraries but for now unit testing is done using what's available in
12461248
2.3.
12471249
"""
1248-
test()
1250+
failure_count = test()
1251+
sys.exit(failure_count)

0 commit comments

Comments
 (0)