Skip to content

Commit

Permalink
Fix Test Discovery for VS code and Terminal (microsoft#41)
Browse files Browse the repository at this point in the history
The `settings.json` change fixes test discovery within VS Code (it
wasn't finding any tests)

The 'pyproject.toml` change means that running `pytest` from the
terminal will only look in the folder where tests live.
  • Loading branch information
stuartleeks authored Sep 10, 2024
2 parents c1b9869 + 70eee8b commit e57f38c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"editor.defaultFormatter": "ms-python.black-formatter"
},
"python.testing.pytestArgs": [
"src"
],
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ line-length = 120
[tool.pytest.ini_options]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
]
]
testpaths = ["./tests"]

0 comments on commit e57f38c

Please sign in to comment.