How to use the ward.fixture function in ward

To help you get started, we’ve selected a few ward 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 darrenburns / ward / tests / test_collect.py View on Github external
@fixture
def named_test():
    return Test(fn=named, module_name="my_module")
github darrenburns / ward / tests / test_util.py View on Github external
@fixture
def s():
    return "hello world"
github darrenburns / ward / tests / test_fixtures.py View on Github external
    @fixture
    def t():
        yield "t"
        events.append("teardown t")
github darrenburns / ward / tests / test_collect.py View on Github external
@fixture
def tests_to_search(named_test=named_test):
    return [named_test]
github darrenburns / ward / tests / test_fixtures.py View on Github external
    @fixture
    def i_raise_an_exception():
        raise ZeroDivisionError()
github darrenburns / ward / tests / test_suite.py View on Github external
@fixture
def module():
    return "test_module"
github darrenburns / ward / tests / test_fixtures.py View on Github external
@fixture
def module_fixture(events=recorded_events):
    @fixture(scope=Scope.Module)
    def m():
        yield "m"
        events.append("teardown m")

    return m
github darrenburns / ward / tests / test_suite.py View on Github external
@fixture
def fixture_b():
    def b():
        return 2

    return b
github darrenburns / ward / tests / test_suite.py View on Github external
    @fixture
    def fix_b():
        events.append(2)
        return "b"