We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 551f25c + 5605e5d commit 44a726cCopy full SHA for 44a726c
tests/test_pytest_mypy.py
@@ -316,3 +316,20 @@ def pytest_configure(config):
316
'*/bad.py:2: error: Incompatible return value*',
317
])
318
assert result.ret != 0
319
+
320
321
+def test_setup_cfg(testdir, xdist_args):
322
+ """Ensure that the plugin allows configuration with setup.cfg."""
323
+ testdir.makefile('.cfg', setup='''
324
+ [mypy]
325
+ disallow_untyped_defs = True
326
+ ''')
327
+ testdir.makepyfile(conftest='''
328
+ def pyfunc(x):
329
+ return x * 2
330
331
+ result = testdir.runpytest_subprocess('--mypy', *xdist_args)
332
+ result.stdout.fnmatch_lines([
333
+ '1: error: Function is missing a type annotation',
334
+ ])
335
+ assert result.ret != 0
0 commit comments