Skip to content

Commit b1a7100

Browse files
committed
Add a test for reading pyproject.toml recursively
1 parent 5da2cc0 commit b1a7100

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

test-data/unit/cmdline.pyproject.test

+35
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,38 @@ Neither is this!
133133
description = "Factory ⸻ A code generator 🏭"
134134
\[tool.mypy]
135135
[file x.py]
136+
137+
[case testSearchRecursively]
138+
# cmd: mypy x.py
139+
[file ../pyproject.toml]
140+
\[tool.mypy]
141+
\[tool.mypy.overrides]
142+
module = "x"
143+
disallow_untyped_defs = false
144+
[file x.py]
145+
pass
146+
[out]
147+
../pyproject.toml: tool.mypy.overrides sections must be an array. Please make sure you are using double brackets like so: [[tool.mypy.overrides]]
148+
== Return code: 0
149+
150+
[case testSearchRecursivelyStopsGit]
151+
# cmd: mypy x.py
152+
[file .git/test]
153+
[file ../pyproject.toml]
154+
\[tool.mypy]
155+
\[tool.mypy.overrides]
156+
module = "x"
157+
disallow_untyped_defs = false
158+
[file x.py]
159+
i: int = 0
160+
161+
[case testSearchRecursivelyStopsHg]
162+
# cmd: mypy x.py
163+
[file .hg/test]
164+
[file ../pyproject.toml]
165+
\[tool.mypy]
166+
\[tool.mypy.overrides]
167+
module = "x"
168+
disallow_untyped_defs = false
169+
[file x.py]
170+
i: int = 0

0 commit comments

Comments
 (0)