Skip to content

Commit

Permalink
Add a test for reading pyproject.toml recursively
Browse files Browse the repository at this point in the history
  • Loading branch information
Felixoid committed Mar 1, 2024
1 parent 5da2cc0 commit b1a7100
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions test-data/unit/cmdline.pyproject.test
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,38 @@ Neither is this!
description = "Factory ⸻ A code generator 🏭"
\[tool.mypy]
[file x.py]

[case testSearchRecursively]
# cmd: mypy x.py
[file ../pyproject.toml]
\[tool.mypy]
\[tool.mypy.overrides]
module = "x"
disallow_untyped_defs = false
[file x.py]
pass
[out]
../pyproject.toml: tool.mypy.overrides sections must be an array. Please make sure you are using double brackets like so: [[tool.mypy.overrides]]
== Return code: 0

[case testSearchRecursivelyStopsGit]
# cmd: mypy x.py
[file .git/test]
[file ../pyproject.toml]
\[tool.mypy]
\[tool.mypy.overrides]
module = "x"
disallow_untyped_defs = false
[file x.py]
i: int = 0

[case testSearchRecursivelyStopsHg]
# cmd: mypy x.py
[file .hg/test]
[file ../pyproject.toml]
\[tool.mypy]
\[tool.mypy.overrides]
module = "x"
disallow_untyped_defs = false
[file x.py]
i: int = 0

0 comments on commit b1a7100

Please sign in to comment.