1234567891011121314151617181920212223242526 |
- import subprocess
- import os
- def find_and_run_tests(path):
- files = os.listdir(path)
- for f in files:
- childpath = os.path.join(path, f)
- if f == "tests":
- subprocess.call(["cd " + path + " && busted " + "."], shell = True)
- elif os.path.isdir(childpath):
- find_and_run_tests(childpath)
-
- dirname, filename = os.path.split(os.path.abspath(__file__))
- find_and_run_tests(dirname)
|