Beispiel #1
0
def test_with_no_checkers_the_result_is_no_seven():
    assert check("something", CheckerCollection()).isseven is False
Beispiel #2
0
def test_if_a_checker_returns_a_success_that_result_is_returned():
    success_result = IsSevenResult(isseven=True, explanation="testing")
    assert (check(
        "something",
        CheckerCollection(lambda _s: success_result)) == success_result)
Beispiel #3
0
def test_it_works_for_decimals(number):
    result = check(str(number),
                   container[Collection[SevenChecker]])  # type: ignore
    assert isinstance(result, IsSevenResult)
Beispiel #4
0
def test_it_works_for_dates(datetime):
    result = check(str(datetime),
                   container[Collection[SevenChecker]])  # type: ignore
    assert isinstance(result, IsSevenResult)
Beispiel #5
0
def test_it_works_for_any_sensible_text(text):
    result = check(text, container[Collection[SevenChecker]])  # type: ignore
    assert isinstance(result, IsSevenResult)