Beispiel #1
0
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()
#!/usr/bin/env python

import tests
import os, sys

if len(sys.argv) > 1 and sys.argv[1] == "update":
    if len(sys.argv) > 2:
        config = tests.get_config(os.path.dirname(sys.argv[2]))
        root, ext = os.path.splitext(sys.argv[2])
        if ext == config.get(tests.get_section(os.path.basename(root), config), 'input_ext'):
            tests.generate(root, config)
        else:
            print(sys.argv[2], 'does not have a valid file extension. Check config.')
    else:
        tests.generate_all()
else:
    tests.run()
Beispiel #3
0
#!/usr/bin/env python

import tests
import os, sys, getopt

if len(sys.argv) > 1 and sys.argv[1] == "update":
    if len(sys.argv) > 2:
        config = tests.get_config(os.path.dirname(sys.argv[2]))
        root, ext = os.path.splitext(sys.argv[2])
        if ext == config.get(tests.get_section(os.path.basename(root), config),
                             'input_ext'):
            tests.generate(root, config)
        else:
            print(file, 'does not have a valid file extension. Check config.')
    else:
        tests.generate_all()
else:
    tests.run()
Beispiel #4
0
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()
Beispiel #5
0
def generate_tests():
    """ Generate all outdated tests. """
    from tests import generate_all
    generate_all()