/python-code-blog-posts

Simple TDD Example based upon Blog Post

Primary LanguagePythonOtherNOASSERTION

python-code-blog-posts

Example repository to go with blog posts that have Python related code examples.

This workspace is a Python project setup for a Python project.

The project is also set up with GitHub Actions for continuous integration, as defined in the .github/workflows/python-app.yml file. This workflow runs tests on every push to any branch.

Setup

  1. Clone the repository:
git clone https://github.com/DEV3L/python-code-blog-posts.git
cd python-code-blog-posts
  1. Setup a virtual environment and activate it:
python3 -m venv .venv
source .venv/bin/activate
  1. Install the dependencies:
pip install .\[dev\]

Testing

Unit Tests

pytest

With coverage:

pytest --cov

With coverage for Coverage Gutters:

pytest --cov --cov-report lcov

Command + Shift + P => Coverage Gutters: Watch