Skip to content

Commit 87b76e7

Browse files
add succeeding test and failing test relevant to feature
1 parent a7bdffd commit 87b76e7

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

mypy/test/meta/test_parse_data.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,26 @@ def test_bad_eq_version_check(self) -> None:
6767
assert (
6868
"version==3.7 always false since minimum runtime version is (3, 10)" in actual.stdout
6969
)
70+
71+
def test_typical_error_comment(self) -> None:
72+
# Act
73+
actual = _run_pytest("""
74+
[case abc]
75+
a # E: typical-looking error comment
76+
""")
77+
78+
# Assert
79+
assert (
80+
"typical-looking error comment" in actual.stderr
81+
)
82+
def test_lineleading_error_comment(self) -> None:
83+
# Act
84+
actual = _run_pytest("""
85+
[case abc]
86+
# E: line-leading error comment
87+
""")
88+
89+
# Assert
90+
assert (
91+
"line-leading error comment" in actual.stderr
92+
)

0 commit comments

Comments
 (0)