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

    with pytest.raises(Exception,
                       match=re.escape(r'No matches found for "\d+" pattern')):
        under_test.page_should_match_regex(r"\d+")
def test_page_should_match_regex(mocker: MockerFixture, under_test: x3270):
    mocker.patch("Mainframe3270.py3270.Emulator.string_get",
                 return_value="abc")

    under_test.page_should_match_regex(r"\w+")