Exemplo n.º 1
0
def load_tests(loader, tests, patterns):
    """
    Custom test loader
    """
    suite = VagrantTestSuite(BASE_BOXES)

    # Add a test case for each fabric task
    path = os.path.join(os.path.dirname(__file__), 'fabfile.py')
    _, tasks, _ = load_fabfile(path)
    for name, task in tasks.items():
        suite.addTest(VagrantFunctionTestCase(task))

    return suite
Exemplo n.º 2
0
def load_tests(loader, tests, patterns):
    """
    Custom test loader
    """
    suite = VagrantTestSuite(BASE_BOXES)

    # Add a test case for each fabric task
    path = os.path.join(os.path.dirname(__file__), "fabfile.py")
    _, tasks, _ = load_fabfile(path)
    for name, task in tasks.items():
        suite.addTest(VagrantFunctionTestCase(task))

    return suite
Exemplo n.º 3
0
def load_tests(loader, tests, patterns):
    """
    Custom test loader
    """
    suite = unittest.TestSuite()

    # Add unit tests (import here to avoid circular import)
    suite.addTest(loader.loadTestsFromModule(unit))

    # Try to add vagrant functional tests
    boxes = base_boxes()
    if boxes:
        vagrant_suite = VagrantTestSuite(boxes)

        # Add a test case for each fabric task
        path = os.path.join(os.path.dirname(__file__), 'fabfile.py')
        _, tasks, _ = load_fabfile(path)
        for name, task in tasks.items():
            vagrant_suite.addTest(VagrantFunctionTestCase(task))

        suite.addTest(vagrant_suite)

    return suite