Add test cases for passing compiled regex

This commit is contained in:
Isaac Virshup 2023-07-18 11:49:29 +02:00
parent 55937a8fea
commit d4c62de2dd
1 changed files with 3 additions and 0 deletions

View File

@ -2,6 +2,7 @@ import importlib
import io import io
import operator import operator
import queue import queue
import re
import sys import sys
import textwrap import textwrap
from pathlib import Path from pathlib import Path
@ -1665,6 +1666,8 @@ def add_note(err: BaseException, msg: str) -> None:
(AssertionError("foo"), ["bar"], "bar"), (AssertionError("foo"), ["bar"], "bar"),
(AssertionError("foo"), ["bar", "baz"], "bar"), (AssertionError("foo"), ["bar", "baz"], "bar"),
(AssertionError("foo"), ["bar", "baz"], "baz"), (AssertionError("foo"), ["bar", "baz"], "baz"),
(ValueError("foo"), ["bar", "baz"], re.compile(r"bar\nbaz", re.MULTILINE)),
(ValueError("foo"), ["bar", "baz"], re.compile(r"BAZ", re.IGNORECASE)),
], ],
) )
def test_check_error_notes_success( def test_check_error_notes_success(