コード例 #1
0
    def test_extract_returns_empty_sting_if_no_match(self):
        content = "Hello. This is a test."
        regex = "I will not match nothin'"

        result = helper.extract(content, regex)

        assert result == ""
コード例 #2
0
    def test_extract_extracts(self):
        content = "This is a test. I'm not a sk8er boi."
        regex = "sk[1-9][aeoir]{2} [\w]*\.$"

        result = helper.extract(content, regex)

        assert result == "sk8er boi."