diff options
author | Waylan Limberg <waylan@gmail.com> | 2011-08-04 12:57:25 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2011-08-04 13:01:10 -0400 |
commit | 596492baa23623411d143186d9cad33a1305cd24 (patch) | |
tree | 3c32eed582c9697d66e058ae967e6c4e443e388a /fabfile.py | |
parent | 2f0af63382e0389d9827787017db729bd7395eb4 (diff) | |
download | markdown-596492baa23623411d143186d9cad33a1305cd24.tar.gz markdown-596492baa23623411d143186d9cad33a1305cd24.tar.bz2 markdown-596492baa23623411d143186d9cad33a1305cd24.zip |
Added some fadfile commands to (re)generate tests when they are added or updated.
Diffstat (limited to 'fabfile.py')
-rw-r--r-- | fabfile.py | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -61,6 +61,22 @@ def build_tests(version=_pyversion[:3]): local('2to3-%s -w build/test.%s/tests' % (version, version)) local('2to3-%s -w build/test.%s/run-tests.py' % (version, version)) +def generate_test(file): + """ Generate a given test. """ + import tests + config = tests.get_config(os.path.dirname(file)) + root, ext = os.path.splitext(file) + if ext == config.get(get_section(os.path.basename(root), config), + 'input_ext'): + tests.generate(root, config) + else: + print test, 'does not have a valid file extension. Check config.' + +def generate_tests(): + """ Generate all outdated tests. """ + from tests import generate_all + generate_all() + def build_env(version=_pyversion[:3]): """ Build testing environment for given Python version. """ if version in confirmed_versions: |