How to use the ward.testing.each 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_testing.py View on Github external
    def test(a=each(1, 2), b=each(3, 4)):
        pass
github darrenburns / ward / tests / test_testing.py View on Github external
    def invalid_test(a=each(1, 2), b=each(3, 4, 5)):
        pass
github darrenburns / ward / tests / test_testing.py View on Github external
    def parameterised_test(a=each(1, 2, 3), b="a value"):
        pass
github darrenburns / ward / tests / test_util.py View on Github external
def _(
    input=s,
    num_chars=each(20, 11, 10, 5),
    expected=each(s, s, "hello w...", "he..."),
):
    result = truncate(input, num_chars)
    expect(result).equals(expected)
github darrenburns / ward / tests / test_util.py View on Github external
def _(
    input=s,
    num_chars=each(20, 11, 10, 5),
    expected=each(s, s, "hello w...", "he..."),
):
    result = truncate(input, num_chars)
    expect(result).equals(expected)