Esempio n. 1
0
def test_chosen_regex_many(writing_string, chosen_regex, expected_count):
    """Check that it can detect many of a regex."""
    assert (fragments.count_specified_regex(writing_string,
                                            chosen_regex) == expected_count)
Esempio n. 2
0
def test_chosen_regex_zero_or_one(writing_string, chosen_regex,
                                  expected_count):
    """Check that it can detect one or more of a regex."""
    assert (fragments.count_specified_regex(writing_string,
                                            chosen_regex) == expected_count)