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 @@ -375,6 +375,30 @@ def pytest_configure(config):
375
375
assert result .ret != 0
376
376
377
377
378
+ @pytest .mark .xfail (
379
+ Version ("0.900" ) > MYPY_VERSION ,
380
+ reason = "Mypy added pyproject.toml configuration in 0.900." ,
381
+ )
382
+ def test_pyproject_toml (testdir , xdist_args ):
383
+ """Ensure that the plugin allows configuration with pyproject.toml."""
384
+ testdir .makefile (
385
+ ".toml" ,
386
+ pyproject = """
387
+ [tool.mypy]
388
+ disallow_untyped_defs = true
389
+ """ ,
390
+ )
391
+ testdir .makepyfile (
392
+ conftest = """
393
+ def pyfunc(x):
394
+ return x * 2
395
+ """ ,
396
+ )
397
+ result = testdir .runpytest_subprocess ("--mypy" , * xdist_args )
398
+ result .stdout .fnmatch_lines (["1: error: Function is missing a type annotation*" ])
399
+ assert result .ret != 0
400
+
401
+
378
402
def test_setup_cfg (testdir , xdist_args ):
379
403
"""Ensure that the plugin allows configuration with setup.cfg."""
380
404
testdir .makefile (
You can’t perform that action at this time.
0 commit comments