예제 #1
0
def test_discover_classes():
    ret = set(discover_classes(Cheetah.testing))
    assert ret == {
        PartialTemplateTestCase,
        ContextManagerPartialTemplateTestCase,
        TestAllPartialsTestedBase,
    }
def test_discover_classes_module_predicate():
    ret = set(discover_classes(
        Cheetah.testing, module_match_func=module_predicate,
    ))
    assert ret == {
        PartialTemplateTestCase, ContextManagerPartialTemplateTestCase,
    }
def test_discover_classes():
    ret = set(discover_classes(Cheetah.testing))
    assert ret == {
        PartialTemplateTestCase,
        ContextManagerPartialTemplateTestCase,
        TestAllPartialsTestedBase,
    }
예제 #4
0
def test_discover_classes_module_predicate():
    ret = set(
        discover_classes(
            Cheetah.testing,
            module_match_func=module_predicate,
        ))
    assert ret == {
        PartialTemplateTestCase,
        ContextManagerPartialTemplateTestCase,
    }
예제 #5
0
def test_discover_classes_module_predicate():
    predicate = lambda module: 'all' not in module.__name__
    ret = set(discover_classes(Cheetah.testing, module_match_func=predicate))
    assert ret == set((PartialTemplateTestCase,))
예제 #6
0
def test_discover_classes_class_predicate():
    predicate = lambda cls: 'All' not in cls.__name__
    ret = set(discover_classes(Cheetah.testing, cls_match_func=predicate))
    assert ret == set((PartialTemplateTestCase,))
예제 #7
0
def test_discover_classes():
    ret = set(discover_classes(Cheetah.testing))
    assert ret == set((PartialTemplateTestCase, TestAllPartialsTestedBase))