+def find_Tests_py(tdict, dirname, names):
+ for n in filter(lambda n: n[-8:] == "Tests.py", names):
+ tdict[os.path.join(dirname, n)] = 1
+
+def find_py(tdict, dirname, names):
+ tests = filter(lambda n: n[-3:] == ".py", names)
+ try:
+ excludes = open(os.path.join(dirname,".exclude_tests")).readlines()
+ except (OSError, IOError):
+ pass
+ else:
+ for exclude in excludes:
+ exclude = string.split(exclude, '#' , 1)[0]
+ exclude = string.strip(exclude)
+ if not exclude: continue
+ tests = filter(lambda n, ex = exclude: n != ex, tests)
+ for n in tests:
+ tdict[os.path.join(dirname, n)] = 1
+