Skip to content

Commit d7aeb2e

Browse files
committed
Test pyproject.toml
1 parent 305e203 commit d7aeb2e

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

test-data/unit/cmdline.test

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def f():
171171
print err
172172

173173
[case testWarnUnusedIgnores]
174-
# cmd: mypy main.py --config-file=
174+
# cmd: mypy main.py --config-file=pyproject.toml
175175
[file pyproject.toml]
176176
\[mypy]
177177
warn_unused_ignores = true
@@ -180,15 +180,24 @@ warn_unused_ignores = true
180180
[out]
181181
main.py:1: error: unused 'type: ignore' comment
182182

183+
[case testMissingMypySection]
184+
# cmd: mypy main.py --config-file=pyproject.toml
185+
[file pyproject.toml]
186+
[file main.py]
187+
# type: ignore
188+
[out]
189+
pyproject.toml: No [mypy] table in config file
190+
== Return code: 0
191+
183192
[case testPerFileConfigSection]
184193
# cmd: mypy x.py y.py z.py
185-
[file mypy.ini]
194+
[file pyproject.toml]
186195
\[mypy]
187-
disallow_untyped_defs = True
188-
\[mypy-y]
189-
disallow_untyped_defs = False
190-
\[mypy-z]
191-
disallow_untyped_calls = True
196+
disallow_untyped_defs = true
197+
\[mypy.overrides.y]
198+
disallow_untyped_defs = false
199+
\[mypy.overrides.z]
200+
disallow_untyped_calls = true
192201
[file x.py]
193202
def f(a):
194203
pass

0 commit comments

Comments
 (0)