Skip to content

Commit 94e5df4

Browse files
meshyseddonym
andcommitted
Test run-running dmypy after a file is altered
These tests show how some errors disappear on a re-run of dmypy after a file is altered. Co-authored-by: David Seddon <[email protected]>
1 parent 9cd625d commit 94e5df4

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

test-data/unit/fine-grained.test

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10505,3 +10505,27 @@ from pkg.sub import modb
1050510505

1050610506
[out]
1050710507
==
10508+
10509+
[case testUnusedTypeIgnorePreservedAfterChange]
10510+
# flags: --warn-unused-ignores --no-error-summary
10511+
[file main.py]
10512+
a = 1 # type: ignore
10513+
[file main.py.2]
10514+
a = 1 # type: ignore
10515+
# Comment to trigger reload.
10516+
[out]
10517+
main.py:1: error: Unused "type: ignore" comment
10518+
==
10519+
main.py:1: error: Unused "type: ignore" comment
10520+
10521+
[case testTypeIgnoreWithoutCodePreservedAfterChange]
10522+
# flags: --enable-error-code ignore-without-code --no-error-summary
10523+
[file main.py]
10524+
a = 1 # type: ignore
10525+
[file main.py.2]
10526+
a = 1 # type: ignore
10527+
# Comment to trigger reload.
10528+
[out]
10529+
main.py:1: error: "type: ignore" comment without error code
10530+
==
10531+
main.py:1: error: "type: ignore" comment without error code

0 commit comments

Comments
 (0)