Skip to content
Myr

Update testing.rst

Before adoption: this commit came in with the history the project adopted, so no landing records it.

It now describes how to install flaskr using pip so that all tests pass.

authored by Nathan McKinley-Pace · committed by GitHub · parent db061cf · Browse files · 1 file+4 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:docs/testing.rst+4 added-1 removed
27 unmodified lines
28First, we need an application to test; we will use the application from29the :ref:`tutorial`. If you don't have that application yet, get the30source code from :gh:`the examples <examples/tutorial>`.3132So that we can import the module ``flaskr`` correctly, we need to run33``pip install -e .`` in the folder ``tutorial``.3435The Testing Skeleton36--------------------3738We begin by adding a tests directory under the application root. Then
9 unmodified lines
48 import tempfile4950 import pytest5149 from flaskr import flaskr52 from flaskr import create_app535455 @pytest.fixture56 def client():
405 unmodified lines