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


Python hamcrest.not_方法代码示例

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


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

示例1: get_updated_skill_manifest

# 需要导入模块: import hamcrest [as 别名]
# 或者: from hamcrest import not_ [as 别名]
def get_updated_skill_manifest(context):
    device_skill_repo = DeviceSkillRepository(context.db)
    skill_manifest = device_skill_repo.get_skill_manifest_for_device(
        context.device_id
    )
    assert_that(len(skill_manifest), equal_to(1))
    manifest_skill = skill_manifest[0]
    assert_that(manifest_skill, not_(equal_to(context.manifest_skill)))
    manifest_skill.update_ts = context.update_ts
    assert_that(manifest_skill, (equal_to(context.manifest_skill))) 
开发者ID:MycroftAI,项目名称:selene-backend,代码行数:12,代码来源:device_skill_manifest.py

示例2: get_skill_manifest_no_device_specific

# 需要导入模块: import hamcrest [as 别名]
# 或者: from hamcrest import not_ [as 别名]
def get_skill_manifest_no_device_specific(context):
    device_skill_repo = DeviceSkillRepository(context.db)
    skill_manifest = device_skill_repo.get_skill_manifest_for_device(
        context.device_id
    )
    assert_that(len(skill_manifest), equal_to(1))
    remaining_skill = skill_manifest[0]
    assert_that(
        remaining_skill.skill_gid,
        not_(equal_to(context.device_specific_skill.skill_gid))
    ) 
开发者ID:MycroftAI,项目名称:selene-backend,代码行数:13,代码来源:device_skill_manifest.py

示例3: test_tables_broken_schema

# 需要导入模块: import hamcrest [as 别名]
# 或者: from hamcrest import not_ [as 别名]
def test_tables_broken_schema(self, simpsons_broken_dataset):
        assert_that(calling(simpsons_broken_dataset.tables.get).with_args(
            'simpsons_episodes'), not_(raises(Exception)))
        assert_that(simpsons_broken_dataset.tables.get('simpsons_episodes'),
                    not_none()) 
开发者ID:datadotworld,项目名称:data.world-py,代码行数:7,代码来源:test_dataset.py

示例4: test_dataframe_broken_schema

# 需要导入模块: import hamcrest [as 别名]
# 或者: from hamcrest import not_ [as 别名]
def test_dataframe_broken_schema(self, simpsons_broken_dataset):
        assert_that(calling(simpsons_broken_dataset.dataframes.get).with_args(
            'simpsons_episodes'), not_(raises(Exception)))
        assert_that(simpsons_broken_dataset.dataframes.get(
            'simpsons_episodes'), not_none()) 
开发者ID:datadotworld,项目名称:data.world-py,代码行数:7,代码来源:test_dataset.py

示例5: test_removes_bond_from_get_bonds

# 需要导入模块: import hamcrest [as 别名]
# 或者: from hamcrest import not_ [as 别名]
def test_removes_bond_from_get_bonds(self):
        self.client.remove_bond(42)

        assert_that(self.client.get_bonds(), not_(has_item(42))) 
开发者ID:internap,项目名称:netman,代码行数:6,代码来源:remove_bond_test.py

示例6: test_removes_interface_from_bond

# 需要导入模块: import hamcrest [as 别名]
# 或者: from hamcrest import not_ [as 别名]
def test_removes_interface_from_bond(self):
        self.client.remove_interface_from_bond(self.test_port)
        bond = self.client.get_bond(42)

        assert_that(bond.members, not_(has_item(self.test_port))) 
开发者ID:internap,项目名称:netman,代码行数:7,代码来源:remove_interface_from_bond_test.py

示例7: check_queues_empty

# 需要导入模块: import hamcrest [as 别名]
# 或者: from hamcrest import not_ [as 别名]
def check_queues_empty(context):
    drain_message_response = sqs.receive_message(QueueUrl=context.drain_url)
    termination_message_response = sqs.receive_message(QueueUrl=context.termination_url)
    warning_message_response = sqs.receive_message(QueueUrl=context.warning_url)
    assert_that(drain_message_response, not_(has_key('Messages')))
    assert_that(termination_message_response, not_(has_key('Messages')))
    assert_that(warning_message_response, not_(has_key('Messages'))) 
开发者ID:Yelp,项目名称:clusterman,代码行数:9,代码来源:draining.py

示例8: _matches

# 需要导入模块: import hamcrest [as 别名]
# 或者: from hamcrest import not_ [as 别名]
def _matches(self, other):
        assert_that(other, is_(not_(None)), "Lookup node doesn't exist")
        nodes = other.xpath(self.xpath)
        assert_that(nodes, has_length(1), "Nodes length should be 1 element")
        assert_that(nodes[0].text, self.matcher)
        return True 
开发者ID:internap,项目名称:fake-switches,代码行数:8,代码来源:assertion_tools.py

示例9: step_scenario

# 需要导入模块: import hamcrest [as 别名]
# 或者: from hamcrest import not_ [as 别名]
def step_scenario(context, scenario):
    matcher = partial(match, not_, has_test_case, scenario)
    context.scenario = matcher
    assert_that(context.allure_report, matcher()) 
开发者ID:allure-framework,项目名称:allure-python,代码行数:6,代码来源:report_steps.py

示例10: step_no_before_fixture

# 需要导入模块: import hamcrest [as 别名]
# 或者: from hamcrest import not_ [as 别名]
def step_no_before_fixture(context, fixture):
    context_matcher = context.scenario
    matcher = partial(context_matcher, not_, has_container, context.allure_report, has_before, fixture)
    assert_that(context.allure_report, matcher()) 
开发者ID:allure-framework,项目名称:allure-python,代码行数:6,代码来源:report_steps.py

示例11: step_impl

# 需要导入模块: import hamcrest [as 别名]
# 或者: from hamcrest import not_ [as 别名]
def step_impl(context, fixture):
    context_matcher = context.scenario
    matcher = partial(context_matcher, not_, has_container, context.allure_report, has_after, fixture)
    assert_that(context.allure_report, matcher()) 
开发者ID:allure-framework,项目名称:allure-python,代码行数:6,代码来源:report_steps.py

示例12: should_not_has_tag

# 需要导入模块: import hamcrest [as 别名]
# 或者: from hamcrest import not_ [as 别名]
def should_not_has_tag(conetxt, tag):
    allure_report, test_case_matcher = conetxt
    tag_matcher = partial(test_case_matcher, not_, has_tag, tag)
    assert_that(allure_report, tag_matcher()) 
开发者ID:allure-framework,项目名称:allure-python,代码行数:6,代码来源:test_allure_library.py

示例13: should_not_has_severity

# 需要导入模块: import hamcrest [as 别名]
# 或者: from hamcrest import not_ [as 别名]
def should_not_has_severity(context):
    allure_report, test_case_matcher = context
    severity_matcher = partial(test_case_matcher, not_, has_severity, anything)
    assert_that(allure_report, severity_matcher()) 
开发者ID:allure-framework,项目名称:allure-python,代码行数:6,代码来源:test_allure_library.py


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