I have a Flask project which uses SQLAlchemy and a database. For testing, I replace the database by an SQLite database.
Now I would like to run some of the views and test for the number of queries executed. Essentially, I want to avoid to accidentially run into the (n+1) select problem. Is it possible to get the number of executed SQL Queries from SQLite or a Pytest / Flask plugin?