File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -348,6 +348,26 @@ def pytest_configure(config):
348348 assert result .ret != 0
349349
350350
351+ def test_pyproject_toml (testdir , xdist_args ):
352+ """Ensure that the plugin allows configuration with pyproject.toml."""
353+ testdir .makefile (
354+ ".toml" ,
355+ pyproject = """
356+ [tool.mypy]
357+ disallow_untyped_defs = true
358+ """ ,
359+ )
360+ testdir .makepyfile (
361+ conftest = """
362+ def pyfunc(x):
363+ return x * 2
364+ """ ,
365+ )
366+ result = testdir .runpytest_subprocess ("--mypy" , * xdist_args )
367+ result .stdout .fnmatch_lines (["1: error: Function is missing a type annotation*" ])
368+ assert result .ret != 0
369+
370+
351371def test_setup_cfg (testdir , xdist_args ):
352372 """Ensure that the plugin allows configuration with setup.cfg."""
353373 testdir .makefile (
You can’t perform that action at this time.
0 commit comments