(self)
| 9507 | # Much of this is really testing _TypeAlias. |
| 9508 | |
| 9509 | def test_basics(self): |
| 9510 | pat = re.compile('[a-z]+', re.I) |
| 9511 | self.assertIsSubclass(pat.__class__, Pattern) |
| 9512 | self.assertIsSubclass(type(pat), Pattern) |
| 9513 | self.assertIsInstance(pat, Pattern) |
| 9514 | |
| 9515 | mat = pat.search('12345abcde.....') |
| 9516 | self.assertIsSubclass(mat.__class__, Match) |
| 9517 | self.assertIsSubclass(type(mat), Match) |
| 9518 | self.assertIsInstance(mat, Match) |
| 9519 | |
| 9520 | # these should just work |
| 9521 | Pattern[Union[str, bytes]] |
| 9522 | Match[Union[bytes, str]] |
| 9523 | |
| 9524 | def test_alias_equality(self): |
| 9525 | self.assertEqual(Pattern[str], Pattern[str]) |
nothing calls this directly
no test coverage detected