Skip to content

Commit 8f05e48

Browse files
committed
Check only the actual call count in the get_proper_type test
1 parent 15849f9 commit 8f05e48

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mypy/test/testtypes.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,11 +1584,12 @@ def make_call(*items: tuple[str, str | None]) -> CallExpr:
15841584
class TestExpandTypeLimitGetProperType(TestCase):
15851585
# WARNING: do not increase this number unless absolutely necessary,
15861586
# and you understand what you are doing.
1587-
ALLOWED_GET_PROPER_TYPES = 9
1587+
ALLOWED_GET_PROPER_TYPES = 7
15881588

15891589
@skipUnless(mypy.expandtype.__file__.endswith(".py"), "Skip for compiled mypy")
15901590
def test_count_get_proper_type(self) -> None:
15911591
with open(mypy.expandtype.__file__) as f:
15921592
code = f.read()
1593-
get_proper_type_count = len(re.findall("get_proper_type", code))
1593+
get_proper_type_count = len(re.findall(r"get_proper_type\(", code))
1594+
get_proper_type_count -= len(re.findall(r"get_proper_type\(\)", code))
15941595
assert get_proper_type_count == self.ALLOWED_GET_PROPER_TYPES

0 commit comments

Comments
 (0)