Skip to content

Commit

Permalink
Fixed the fabfile geterate_test(s) commands so they actually import t…
Browse files Browse the repository at this point in the history
…he testing framework.
  • Loading branch information
Waylan Limberg committed Aug 17, 2011
1 parent 85f355b commit 39e9e08
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,21 @@ def build_tests(version=_pyversion[:3]):

def generate_test(file):
""" Generate a given test. """
import sys, os
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
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),
if ext == config.get(tests.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.'
print file, 'does not have a valid file extension. Check config.'

def generate_tests():
""" Generate all outdated tests. """
import sys, os
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
from tests import generate_all
generate_all()

Expand Down

0 comments on commit 39e9e08

Please sign in to comment.