Ejemplo n.º 1
0
    def test_excludes_by_test_method_decorator(self):
        class Test(unittest.TestCase):

            @tag('include')
            def test_method(self):
                pass
        suite = unittest.TestSuite([Test('test_method')])
        tags = TagExpression('~@include')

        filtered = tags.filter_suite(suite)

        map(str, filtered) |should| each_be_equal_to([])
Ejemplo n.º 2
0
    def test_excludes_by_test_method_decorator(self):
        class Test(unittest.TestCase):
            @tag('include')
            def test_method(self):
                pass

        suite = unittest.TestSuite([Test('test_method')])
        tags = TagExpression('~@include')

        filtered = tags.filter_suite(suite)

        map(str, filtered) | should | each_be_equal_to([])
Ejemplo n.º 3
0
    def test_includes_by_test_case_decorator(self):
        @tag('include')
        class Test(unittest.TestCase):

            def test_method(self):
                pass
        suite = unittest.TestSuite([Test('test_method')])
        tags = TagExpression('@include')

        filtered = tags.filter_suite(suite)

        map(str, filtered) |should| each_be_equal_to([
            'test_method (vows.test_tags.Test)',
        ])
Ejemplo n.º 4
0
    def test_includes_by_test_case_decorator(self):
        @tag('include')
        class Test(unittest.TestCase):
            def test_method(self):
                pass

        suite = unittest.TestSuite([Test('test_method')])
        tags = TagExpression('@include')

        filtered = tags.filter_suite(suite)

        map(str, filtered) | should | each_be_equal_to([
            'test_method (vows.test_tags.Test)',
        ])