Skip to content

Commit 2f86aec

Browse files
committed
update README with optional VSCode settings for pytest
1 parent da81590 commit 2f86aec

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,34 @@ These resources can help:
475475
---
476476

477477

478+
### VS Code Setup (Optional)
479+
480+
If you're using VS Code, you can use our recommended settings for better Python and pytest integration:
481+
482+
1. Create a `.vscode` folder in the project root (if it doesn't exist)
483+
2. Create a `settings.json` file inside `.vscode/`
484+
3. Add the following configuration:
485+
```json
486+
{
487+
"python.testing.pytestEnabled": true,
488+
"python.analysis.extraPaths": [
489+
"./src"
490+
],
491+
"python.testing.pytestArgs": [
492+
"."
493+
],
494+
"python.testing.unittestEnabled": false
495+
}
496+
```
497+
498+
This configuration:
478499

500+
- Enables pytest as the test framework
501+
- Adds the src/ directory to Python paths (fixes import warnings)
502+
- Configures pytest to discover tests from the project root
503+
- Disables unittest to avoid conflicts
479504

505+
Note: The .vscode/ folder is gitignored, so these settings won't be tracked. Each developer can customize them as needed.
480506

481507

482508

0 commit comments

Comments
 (0)