Skip to content

Commit 9e1f65d

Browse files
committed
Fix test case
1 parent 83914fd commit 9e1f65d

1 file changed

Lines changed: 16 additions & 5 deletions

File tree

mypy/test/test_nativeparse.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,22 @@
77
from __future__ import annotations
88

99
import contextlib
10-
import gc
1110
import os
1211
import tempfile
1312
import unittest
1413
from collections.abc import Iterator
1514
from typing import Any
1615

1716
from mypy import defaults, nodes
18-
from mypy.cache import END_TAG, LIST_GEN, LITERAL_INT, LITERAL_STR, LOCATION
17+
from mypy.cache import (
18+
END_TAG,
19+
LIST_GEN,
20+
LIST_INT,
21+
LITERAL_INT,
22+
LITERAL_NONE,
23+
LITERAL_STR,
24+
LOCATION,
25+
)
1926
from mypy.config_parser import parse_mypy_comments
2027
from mypy.errors import CompileError
2128
from mypy.nodes import ExpressionStmt, MemberExpr, MypyFile
@@ -234,13 +241,17 @@ def locs(start_line: int, start_column: int, end_line: int, end_column: int) ->
234241
+ [nodes.NAME_EXPR, LITERAL_STR]
235242
+ [int_enc(5)]
236243
+ list(b"print")
237-
+ locs(1, 1, 1, 6)
244+
+ locs(1, 0, 1, 5)
238245
+ [END_TAG, LIST_GEN, 22, nodes.STR_EXPR]
239246
+ [LITERAL_STR, int_enc(5)]
240247
+ list(b"hello")
241-
+ locs(1, 7, 1, 14)
248+
+ locs(1, 6, 1, 13)
242249
+ [END_TAG]
243-
+ locs(1, 1, 1, 15)
250+
# arg_kinds: [ARG_POS]
251+
+ [LIST_INT, 22, int_enc(0)]
252+
# arg_names: [None]
253+
+ [LIST_GEN, 22, LITERAL_NONE]
254+
+ locs(1, 0, 1, 14)
244255
+ [END_TAG, END_TAG]
245256
)
246257

0 commit comments

Comments
 (0)