Skip to content

Commit 498c829

Browse files
author
ARF
committed
remove test verbosity to make it easier to spot the test failures
1 parent bb5f7cf commit 498c829

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

shapefile.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,10 +1187,14 @@ def __fieldNorm(self, fieldName):
11871187
fieldName.replace(' ', '_')
11881188

11891189
# Begin Testing
1190-
def test():
1190+
def test(verbosity):
11911191
import doctest
11921192
doctest.NORMALIZE_WHITESPACE = 1
1193-
failure_count, test_count = doctest.testfile("README.txt", verbose=1)
1193+
if verbosity == 0:
1194+
print('Running doctests...')
1195+
failure_count, test_count = doctest.testfile("README.txt", verbose=verbosity)
1196+
if verbosity == 0 and failure_count == 0:
1197+
print('All test passed successfully')
11941198
return failure_count
11951199

11961200
if __name__ == "__main__":
@@ -1200,6 +1204,6 @@ def test():
12001204
testing libraries but for now unit testing is done using what's available in
12011205
2.3.
12021206
"""
1203-
failure_count = test()
1207+
failure_count = test(0)
12041208
sys.exit(failure_count)
12051209

0 commit comments

Comments
 (0)