Skip to content

Commit 6d9ffca

Browse files
Update test
1 parent 341ed71 commit 6d9ffca

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

tests/lint/unittest_lint.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,11 +1081,11 @@ def test_no_false_positive_from_pyi_stub() -> None:
10811081
"y",
10821082
"--prefer-stubs",
10831083
"n",
1084-
join(REGRTEST_DATA_DIR, "pyi"),
1084+
join(REGRTEST_DATA_DIR, "uses_module_with_stub.py"),
10851085
],
10861086
exit=False,
10871087
)
1088-
assert run._output is None
1088+
assert not run.linter.stats.by_msg
10891089

10901090

10911091
@pytest.mark.parametrize(

tests/regrtest_data/pyi/uses_foo.py

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""If the stub is preferred over the .py, this might emit not-an-iterable"""
2+
from pyi.foo import three_item_iterable
3+
4+
for val in three_item_iterable():
5+
print(val)

0 commit comments

Comments
 (0)