aboutsummaryrefslogtreecommitdiffstats
path: root/fabfile.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2011-08-04 12:57:25 -0400
committerWaylan Limberg <waylan@gmail.com>2011-08-04 13:01:10 -0400
commit596492baa23623411d143186d9cad33a1305cd24 (patch)
tree3c32eed582c9697d66e058ae967e6c4e443e388a /fabfile.py
parent2f0af63382e0389d9827787017db729bd7395eb4 (diff)
downloadmarkdown-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.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/fabfile.py b/fabfile.py
index 9680bd1..007fd7f 100644
--- a/fabfile.py
+++ b/fabfile.py
@@ -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: