Skip to content

Commit c81b3c2

Browse files
committed
Re-use windows_flag in test
1 parent 79ab01b commit c81b3c2

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

test/test_plugin.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@
3030
'test_plugin.py:124:1:129:77: note: Use "-> None" if function does not return a value'
3131
)
3232

33-
windows_flag: dict[str, int] = (
34-
{"creationflags": subprocess.CREATE_NO_WINDOW} if os.name == "nt" else {} # type: ignore
35-
)
36-
3733

3834
@pytest.fixture
3935
def last_diagnostics_monkeypatch(monkeypatch):
@@ -251,7 +247,7 @@ def test_option_overrides_dmypy(last_diagnostics_monkeypatch, workspace):
251247
"--no-pretty",
252248
document.path,
253249
]
254-
m.assert_called_with(expected, capture_output=True, **windows_flag, encoding="utf-8")
250+
m.assert_called_with(expected, capture_output=True, **plugin.windows_flag, encoding="utf-8")
255251

256252

257253
def test_dmypy_status_file(tmpdir, last_diagnostics_monkeypatch, workspace):

0 commit comments

Comments
 (0)