File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -348,6 +348,30 @@ def pytest_configure(config):
348
348
assert result .ret != 0
349
349
350
350
351
+ @pytest .mark .xfail (
352
+ Version ("0.900" ) > MYPY_VERSION ,
353
+ reason = "Mypy added pyproject.toml configuration in 0.900." ,
354
+ )
355
+ def test_pyproject_toml (testdir , xdist_args ):
356
+ """Ensure that the plugin allows configuration with pyproject.toml."""
357
+ testdir .makefile (
358
+ ".toml" ,
359
+ pyproject = """
360
+ [tool.mypy]
361
+ disallow_untyped_defs = true
362
+ """ ,
363
+ )
364
+ testdir .makepyfile (
365
+ conftest = """
366
+ def pyfunc(x):
367
+ return x * 2
368
+ """ ,
369
+ )
370
+ result = testdir .runpytest_subprocess ("--mypy" , * xdist_args )
371
+ result .stdout .fnmatch_lines (["1: error: Function is missing a type annotation*" ])
372
+ assert result .ret != 0
373
+
374
+
351
375
def test_setup_cfg (testdir , xdist_args ):
352
376
"""Ensure that the plugin allows configuration with setup.cfg."""
353
377
testdir .makefile (
You can’t perform that action at this time.
0 commit comments