示例#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([])
示例#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([])
示例#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)',
        ])
示例#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)',
        ])