unittest.py

changeset 120
11af938d6076
parent 117
178d6e54694f
child 122
116a81996832
equal deleted inserted replaced
119:29ba0edf8419 120:11af938d6076
9 def unit_test_discovery(): 9 def unit_test_discovery():
10 ''' Yields unit test paths ''' 10 ''' Yields unit test paths '''
11 import os 11 import os
12 unit_test_dir = Path(script_directory) / 'unittests' 12 unit_test_dir = Path(script_directory) / 'unittests'
13 for dirpath, dirnames, filenames in os.walk(unit_test_dir): 13 for dirpath, dirnames, filenames in os.walk(unit_test_dir):
14 yield from ( 14 yield from sorted(
15 Path(dirpath) / filename 15 Path(dirpath) / filename
16 for filename in filenames 16 for filename in filenames
17 if filename.endswith('.test') 17 if filename.endswith('.test')
18 ) 18 )
19 19

mercurial