How to use allure-python-commons-test - 4 common examples

To help you get started, we’ve selected a few allure-python-commons-test examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github allure-framework / allure-python / allure-python-commons-test / src / container.py View on Github external
>>> assert_that(Report,
    ...             has_test_case('test_case_without_container',
    ...                           has_container(Report,
    ...                                        has_before('before_fixture')
    ...                           )
    ...             )
    ... ) # doctest: +ELLIPSIS
    Traceback (most recent call last):
       ...
    AssertionError: ...
    Expected: ...
         but: ...
    
    """
    return HasContainer(report, *matchers)
github allure-framework / allure-python / allure-python-commons-test / src / container.py View on Github external
>>> assert_that(Report,
    ...             has_same_container('first_test_case', 'second_test_case')
    ... )

    >>> assert_that(Report,
    ...             has_same_container('second_test_case', 'third_test_case')
    ... ) # doctest: +ELLIPSIS
    Traceback (most recent call last):
       ...
    AssertionError: ...
    Expected: ...
         but: ...
    
    """
    return HasSameContainer(*args)
github allure-framework / allure-python / allure-python-commons-test / src / report.py View on Github external
def has_only_n_test_cases(name, num, *matchers):
    return has_property('test_cases',
                        ContainsExactly(num,
                                        all_of(
                                            any_of(
                                                has_entry('fullName', ends_with(name)),
                                                has_entry('name', ends_with(name))
                                            ),
                                            *matchers
                                        )
github allure-framework / allure-python / allure-python-commons-test / src / report.py View on Github external
def has_only_testcases(*matchers):
    return HasOnlyTetcases(*matchers)

allure-python-commons-test

A collection of PyHamcrest matchers to test Allure adapters for Python test frameworks

Apache-2.0
Latest version published 27 days ago

Package Health Score

84 / 100
Full package analysis

Similar packages