Skip to content

Commit

Permalink
Merge pull request #211 from lsst-sqre/u/rra/doc-fix
Browse files Browse the repository at this point in the history
Fix spawn_uvicorn documentation
  • Loading branch information
rra authored Oct 3, 2023
2 parents 2f89ee2 + 21dcf82 commit 15ed2c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/user-guide/uvicorn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This code assumes the source code of the test app is in the variable ``_APP_SOUR
@pytest.fixture
def uvicorn(tmp_path: Path) -> Iterator[UvicornProcess]:
def server(tmp_path: Path) -> Iterator[UvicornProcess]:
app_path = tmp_path / "test.py"
app_path.write_text(_APP_SOURCE)
uvicorn = spawn_uvicorn(working_directory=tmp_path, app="test:app")
Expand All @@ -49,14 +49,14 @@ Alternately, if you need to dynamically create the application (using other fixt
@pytest.fixture
def uvicorn(tmp_path: Path) -> Iterator[UvicornProcess]:
def server(tmp_path: Path) -> Iterator[UvicornProcess]:
app_path = tmp_path / "test.py"
app_path.write_text(_APP_SOURCE)
uvicorn = spawn_uvicorn(
working_directory=tmp_path,
factory="tests.support.selenium:create_app",
)
yield process
yield uvicorn
uvicorn.process.terminate()
By default, the output from Uvicorn is sent to the normal standard output and standard error, where it will be captured by pytest but will not be available to the test.
Expand Down

0 comments on commit 15ed2c0

Please sign in to comment.