|
Revision 948
(checked in by seang, 1 year ago)
|
Add benchmark script and set eol-style to native on everything except the shapefile
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
if __name__ == '__main__': |
|---|
| 3 |
import doctest |
|---|
| 4 |
import getopt |
|---|
| 5 |
import glob |
|---|
| 6 |
import sys |
|---|
| 7 |
|
|---|
| 8 |
verbosity = 0 |
|---|
| 9 |
pattern = None |
|---|
| 10 |
|
|---|
| 11 |
try: |
|---|
| 12 |
opts, args = getopt.getopt(sys.argv[1:], 'vt:') |
|---|
| 13 |
for o, a in opts: |
|---|
| 14 |
if o == '-v': |
|---|
| 15 |
verbosity = verbosity + 1 |
|---|
| 16 |
if o == '-t': |
|---|
| 17 |
pattern = a |
|---|
| 18 |
except: |
|---|
| 19 |
pass |
|---|
| 20 |
|
|---|
| 21 |
docfiles = [ |
|---|
| 22 |
'docs/reading-data.txt' |
|---|
| 23 |
] |
|---|
| 24 |
|
|---|
| 25 |
if pattern: |
|---|
| 26 |
tests = [f for f in docfiles if f.find(pattern) == 0] |
|---|
| 27 |
else: |
|---|
| 28 |
tests = docfiles |
|---|
| 29 |
|
|---|
| 30 |
for file in tests: |
|---|
| 31 |
doctest.testfile(file, verbosity) |
|---|
| 32 |
|
|---|