def test_page_should_not_match_regex_fails(mocker: MockerFixture,
                                           under_test: x3270):
    mocker.patch("Mainframe3270.py3270.Emulator.string_get", return_value="a")

    with pytest.raises(
            Exception,
            match=re.escape('There are matches found for "[a]+" pattern')):
        under_test.page_should_not_match_regex("[a]+")
def test_page_should_not_match_regex(mocker: MockerFixture, under_test: x3270):
    mocker.patch("Mainframe3270.py3270.Emulator.string_get",
                 return_value="abc")

    under_test.page_should_not_match_regex(r"\d+")