Changeset 620
- Timestamp:
- 02/01/07 21:15:00
- Files:
-
- OWSLib/trunk/tests/runalldoctests.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
OWSLib/trunk/tests/runalldoctests.py
r522 r620 1 1 import doctest 2 import getopt 2 3 import glob 4 import sys 5 3 6 import pkg_resources 4 7 … … 8 11 pass 9 12 10 testfiles = glob.glob('*.txt') 13 def run(pattern): 14 if pattern is None: 15 testfiles = glob.glob('*.txt') 16 else: 17 testfiles = glob.glob(pattern) 18 for file in testfiles: 19 doctest.testfile(file) 11 20 12 for file in testfiles: 13 doctest.testfile(file) 21 if __name__ == "__main__": 22 try: 23 opts, args = getopt.getopt(sys.argv[1:], "t:v") 24 except getopt.GetoptError: 25 print "Usage: python runalldoctests.py [-t GLOB_PATTERN]" 26 sys.exit(2) 27 pattern = None 28 for o, a in opts: 29 if o == '-t': 30 pattern = a 31 run(pattern) 14 32
