當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。