当前位置: 首页>>代码示例>>Python>>正文


Python TagExpression.check方法代码示例

本文整理汇总了Python中behave.tag_expression.TagExpression.check方法的典型用法代码示例。如果您正苦于以下问题:Python TagExpression.check方法的具体用法?Python TagExpression.check怎么用?Python TagExpression.check使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在behave.tag_expression.TagExpression的用法示例。


在下文中一共展示了TagExpression.check方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: TestTagExpressionFooOrBarAndNotZap

# 需要导入模块: from behave.tag_expression import TagExpression [as 别名]
# 或者: from behave.tag_expression.TagExpression import check [as 别名]
class TestTagExpressionFooOrBarAndNotZap(object):
    def setUp(self):
        self.e = TagExpression(['foo,bar', '-zap'])

    def test_should_match_foo(self):
        assert self.e.check(['foo'])

    def test_should_not_match_foo_zap(self):
        assert not self.e.check(['foo', 'zap'])
开发者ID:AnuragMala,项目名称:behave-parallel,代码行数:11,代码来源:test_tag_expression.py

示例2: TestTagExpressionNotFoo

# 需要导入模块: from behave.tag_expression import TagExpression [as 别名]
# 或者: from behave.tag_expression.TagExpression import check [as 别名]
class TestTagExpressionNotFoo(object):
    def setUp(self):
        self.e = TagExpression(['-foo'])

    def test_should_match_bar(self):
        assert self.e.check(['bar'])

    def test_should_not_match_foo(self):
        assert not self.e.check(['foo'])
开发者ID:AnuragMala,项目名称:behave-parallel,代码行数:11,代码来源:test_tag_expression.py

示例3: TestTagExpressionNoTags

# 需要导入模块: from behave.tag_expression import TagExpression [as 别名]
# 或者: from behave.tag_expression.TagExpression import check [as 别名]
class TestTagExpressionNoTags(object):
    def setUp(self):
        self.e = TagExpression([])

    def test_should_match_foo(self):
        assert self.e.check(['foo'])

    def test_should_match_empty_tags(self):
        assert self.e.check([])
开发者ID:AnuragMala,项目名称:behave-parallel,代码行数:11,代码来源:test_tag_expression.py

示例4: TestTagExpressionNotFooWithTilde

# 需要导入模块: from behave.tag_expression import TagExpression [as 别名]
# 或者: from behave.tag_expression.TagExpression import check [as 别名]
class TestTagExpressionNotFooWithTilde(unittest.TestCase):
    def setUp(self):
        self.e = TagExpression(['~foo'])

    def test_should_match_bar(self):
        assert self.e.check(['bar'])

    def test_should_not_match_foo(self):
        assert not self.e.check(['foo'])
开发者ID:hangtwenty,项目名称:behave,代码行数:11,代码来源:test_tag_expression.py

示例5: TestTagExpressionFoo

# 需要导入模块: from behave.tag_expression import TagExpression [as 别名]
# 或者: from behave.tag_expression.TagExpression import check [as 别名]
class TestTagExpressionFoo(unittest.TestCase):
    def setUp(self):
        self.e = TagExpression(['foo'])

    def test_should_not_match_no_tags(self):
        assert not self.e.check([])

    def test_should_match_foo(self):
        assert self.e.check(['foo'])

    def test_should_not_match_bar(self):
        assert not self.e.check(['bar'])
开发者ID:AbstractBeliefs,项目名称:behave,代码行数:14,代码来源:test_tag_expression.py

示例6: TestTagExpressionFooOrBarAndNotZapWithTilde

# 需要导入模块: from behave.tag_expression import TagExpression [as 别名]
# 或者: from behave.tag_expression.TagExpression import check [as 别名]
class TestTagExpressionFooOrBarAndNotZapWithTilde(unittest.TestCase):
    def setUp(self):
        self.e = TagExpression(['foo,bar', '~zap'])

    def test_should_match_foo(self):
        assert self.e.check(['foo'])

    def test_should_not_match_zap(self):
        assert not self.e.check(['zap'])

    def test_should_not_match_foo_zap(self):
        assert not self.e.check(['foo', 'zap'])
开发者ID:hangtwenty,项目名称:behave,代码行数:14,代码来源:test_tag_expression.py

示例7: TestTagExpressionFoo3OrNotBar4AndZap5

# 需要导入模块: from behave.tag_expression import TagExpression [as 别名]
# 或者: from behave.tag_expression.TagExpression import check [as 别名]
class TestTagExpressionFoo3OrNotBar4AndZap5(object):
    def setUp(self):
        self.e = TagExpression(['foo:3,-bar', 'zap:5'])

    def test_should_count_tags_for_positive_tags(self):
        tools.eq_(self.e.limits, {'foo': 3, 'zap': 5})

    def test_should_match_foo_zap(self):
        assert self.e.check(['foo', 'zap'])
开发者ID:AnuragMala,项目名称:behave-parallel,代码行数:11,代码来源:test_tag_expression.py

示例8: TestTagExpressionFooAndBar

# 需要导入模块: from behave.tag_expression import TagExpression [as 别名]
# 或者: from behave.tag_expression.TagExpression import check [as 别名]
class TestTagExpressionFooAndBar(unittest.TestCase):
    # -- LOGIC: @foo and @bar

    def setUp(self):
        self.e = TagExpression(['foo', 'bar'])

    def test_should_not_match_no_tags(self):
        assert not self.e.check([])

    def test_should_not_match_foo(self):
        assert not self.e.check(['foo'])

    def test_should_not_match_bar(self):
        assert not self.e.check(['bar'])

    def test_should_not_match_other(self):
        assert not self.e.check(['other'])

    def test_should_match_foo_bar(self):
        assert self.e.check(['foo', 'bar'])
        assert self.e.check(['bar', 'foo'])

    def test_should_not_match_foo_other(self):
        assert not self.e.check(['foo', 'other'])
        assert not self.e.check(['other', 'foo'])

    def test_should_not_match_bar_other(self):
        assert not self.e.check(['bar', 'other'])
        assert not self.e.check(['other', 'bar'])

    def test_should_not_match_zap_other(self):
        assert not self.e.check(['zap', 'other'])
        assert not self.e.check(['other', 'zap'])

    def test_should_match_foo_bar_other(self):
        assert self.e.check(['foo', 'bar', 'other'])
        assert self.e.check(['bar', 'other', 'foo'])
        assert self.e.check(['other', 'bar', 'foo'])

    def test_should_not_match_foo_zap_other(self):
        assert not self.e.check(['foo', 'zap', 'other'])
        assert not self.e.check(['other', 'zap', 'foo'])

    def test_should_not_match_bar_zap_other(self):
        assert not self.e.check(['bar', 'zap', 'other'])
        assert not self.e.check(['other', 'bar', 'zap'])

    def test_should_not_match_zap_baz_other(self):
        assert not self.e.check(['zap', 'baz', 'other'])
        assert not self.e.check(['baz', 'other', 'baz'])
        assert not self.e.check(['other', 'baz', 'zap'])
开发者ID:AbstractBeliefs,项目名称:behave,代码行数:53,代码来源:test_tag_expression.py

示例9: TestTagExpressionFooOrBarAndNotZap

# 需要导入模块: from behave.tag_expression import TagExpression [as 别名]
# 或者: from behave.tag_expression.TagExpression import check [as 别名]
class TestTagExpressionFooOrBarAndNotZap(unittest.TestCase):
    def setUp(self):
        self.e = TagExpression(['foo,bar', '-zap'])

    def test_should_match_foo(self):
        assert self.e.check(['foo'])

    def test_should_not_match_foo_zap(self):
        assert not self.e.check(['foo', 'zap'])

    def test_should_not_match_tags(self):
        assert not self.e.check([])

    def test_should_match_foo(self):
        assert self.e.check(['foo'])

    def test_should_match_bar(self):
        assert self.e.check(['bar'])

    def test_should_not_match_other(self):
        assert not self.e.check(['other'])

    def test_should_match_foo_bar(self):
        assert self.e.check(['foo', 'bar'])
        assert self.e.check(['bar', 'foo'])

    def test_should_match_foo_other(self):
        assert self.e.check(['foo', 'other'])
        assert self.e.check(['other', 'foo'])

    def test_should_match_bar_other(self):
        assert self.e.check(['bar', 'other'])
        assert self.e.check(['other', 'bar'])

    def test_should_not_match_zap_other(self):
        assert not self.e.check(['zap', 'other'])
        assert not self.e.check(['other', 'zap'])

    def test_should_match_foo_bar_other(self):
        assert self.e.check(['foo', 'bar', 'other'])
        assert self.e.check(['bar', 'other', 'foo'])
        assert self.e.check(['other', 'bar', 'foo'])

    def test_should_not_match_foo_bar_zap(self):
        assert not self.e.check(['foo', 'bar', 'zap'])
        assert not self.e.check(['bar', 'zap', 'foo'])
        assert not self.e.check(['zap', 'bar', 'foo'])

    def test_should_not_match_foo_zap_other(self):
        assert not self.e.check(['foo', 'zap', 'other'])
        assert not self.e.check(['other', 'zap', 'foo'])

    def test_should_not_match_bar_zap_other(self):
        assert not self.e.check(['bar', 'zap', 'other'])
        assert not self.e.check(['other', 'bar', 'zap'])

    def test_should_not_match_zap_baz_other(self):
        assert not self.e.check(['zap', 'baz', 'other'])
        assert not self.e.check(['baz', 'other', 'baz'])
        assert not self.e.check(['other', 'baz', 'zap'])
开发者ID:AbstractBeliefs,项目名称:behave,代码行数:62,代码来源:test_tag_expression.py


注:本文中的behave.tag_expression.TagExpression.check方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。