mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Add test case for recent types-regex regression (#9269)
This commit is contained in:
13
stubs/regex/@tests/test_cases/check_finditer.py
Normal file
13
stubs/regex/@tests/test_cases/check_finditer.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# pyright: reportUnnecessaryTypeIgnoreComment=true
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import List
|
||||
from typing_extensions import assert_type
|
||||
|
||||
import regex
|
||||
|
||||
# Regression tests for #9263
|
||||
assert_type(list(regex.finditer(r"foo", "foo")), List[regex.Match[str]])
|
||||
pat = regex.compile(rb"foo")
|
||||
assert_type(list(pat.finditer(b"foo")), List[regex.Match[bytes]])
|
||||
Reference in New Issue
Block a user