Search⌘ K

Commands for Testing: Flask Application

Understand how to use pytest for testing Flask applications within the correct virtual environment using pipenv. Learn to integrate automated testing with Git hooks to run tests on every commit, ensuring robust code management and preventing faulty commits.

We'll cover the following...

Run pytest

When we try to run pytest, we encounter a different problem. Namely, it’s a Python script and must run in the right virtual environment, regardless of whether the Shell was in that virtual ...