(self)
| 9389 | # Much of this is really testing _TypeAlias. |
| 9390 | |
| 9391 | def test_basics(self): |
| 9392 | pat = re.compile('[a-z]+', re.I) |
| 9393 | self.assertIsSubclass(pat.__class__, Pattern) |
| 9394 | self.assertIsSubclass(type(pat), Pattern) |
| 9395 | self.assertIsInstance(pat, Pattern) |
| 9396 | |
| 9397 | mat = pat.search('12345abcde.....') |
| 9398 | self.assertIsSubclass(mat.__class__, Match) |
| 9399 | self.assertIsSubclass(type(mat), Match) |
| 9400 | self.assertIsInstance(mat, Match) |
| 9401 | |
| 9402 | # these should just work |
| 9403 | Pattern[Union[str, bytes]] |
| 9404 | Match[Union[bytes, str]] |
| 9405 | |
| 9406 | def test_alias_equality(self): |
| 9407 | self.assertEqual(Pattern[str], Pattern[str]) |
nothing calls this directly
no test coverage detected