https://github.com/pytest-with-eric/run-pytest-in-vscode-example
How To Run Pytest In VS Code (Easy To Follow Step-By-Step Tutorial)
https://github.com/pytest-with-eric/run-pytest-in-vscode-example
ide-testing pytest-plugin pytest-vscode
Last synced: 26 days ago
JSON representation
How To Run Pytest In VS Code (Easy To Follow Step-By-Step Tutorial)
- Host: GitHub
- URL: https://github.com/pytest-with-eric/run-pytest-in-vscode-example
- Owner: Pytest-with-Eric
- Created: 2023-07-30T16:59:18.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-13T13:32:51.000Z (over 1 year ago)
- Last Synced: 2025-03-24T06:52:43.002Z (about 1 month ago)
- Topics: ide-testing, pytest-plugin, pytest-vscode
- Language: Python
- Homepage: https://pytest-with-eric.com/introduction/how-to-run-pytest-in-vscode/
- Size: 3.91 KB
- Stars: 1
- Watchers: 0
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example code for the article **How to Run Pytest in VScode**
## Task
This repo contains the sample code for the article [How To Run Pytest In VS Code (Easy To Follow Step-By-Step Tutorial)](https://pytest-with-eric.com/introduction/how-to-run-pytest-in-vscode/)
## Code
The source code is a simple Python script that calculates the area of various shapes and can be found at `src/calculator.py`.Unit Tests can be found at `tests/unit/test_calculator.py`
## Requirements
* Python (3.8+)Please create a virtual environment and activate it.
Install the dependencies via the `requirements.txt` file using
```commandline
pip install -r requirements.txt
```
If you don't have Pip installed please follow instructions online on how to do it.## How To Run the Unit Tests
To run the Unit Tests, from the root of the repo run
```commandline
pytest
```
or for more verbose output
```
pytest -v
```