Skip to content

Commit

Permalink
Update links to pytest docs
Browse files Browse the repository at this point in the history
  • Loading branch information
br3ndonland committed Apr 18, 2021
1 parent 273f795 commit aa243dd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -452,17 +452,18 @@ See _[CONTRIBUTING.md](./.github/CONTRIBUTING.md)_ for general information on ho
### Testing with pytest

- Tests are in the _tests/_ directory.
- Run tests by [invoking `pytest` from the command-line](https://docs.pytest.org/en/stable/usage.html) within the Poetry environment in the root directory of the repo.
- Run tests by [invoking `pytest` from the command-line](https://docs.pytest.org/en/latest/how-to/usage.html) within the Poetry environment in the root directory of the repo.
- [pytest](https://docs.pytest.org/en/latest/) features used include:
- [fixtures](https://docs.pytest.org/en/latest/fixture.html)
- [monkeypatch](https://docs.pytest.org/en/latest/monkeypatch.html)
- [parametrize](https://docs.pytest.org/en/latest/parametrize.html)
- [`tmp_path`](https://docs.pytest.org/en/latest/tmpdir.html)
- [pytest plugins](https://docs.pytest.org/en/stable/plugins.html) include:
- [capturing `stdout` with `capfd`](https://docs.pytest.org/en/latest/how-to/capture-stdout-stderr.html)
- [fixtures](https://docs.pytest.org/en/latest/how-to/fixtures.html)
- [monkeypatch](https://docs.pytest.org/en/latest/how-to/monkeypatch.html)
- [parametrize](https://docs.pytest.org/en/latest/how-to/parametrize.html)
- [temporary directories and files (`tmp_path` and `tmp_dir`)](https://docs.pytest.org/en/latest/how-to/tmpdir.html)
- [pytest plugins](https://docs.pytest.org/en/latest/how-to/plugins.html) include:
- [pytest-cov](https://github.com/pytest-dev/pytest-cov)
- [pytest-mock](https://github.com/pytest-dev/pytest-mock)
- [pytest configuration](https://docs.pytest.org/en/stable/customize.html) is in _[pyproject.toml](https://github.com/br3ndonland/inboard/blob/develop/pyproject.toml)_.
- [FastAPI testing](https://fastapi.tiangolo.com/tutorial/testing/) and [Starlette testing](https://www.starlette.io/testclient/) rely on the [Starlette `TestClient`](https://www.starlette.io/testclient/), which uses [Requests](https://requests.readthedocs.io/en/master/) under the hood.
- [pytest configuration](https://docs.pytest.org/en/latest/reference/customize.html) is in _[pyproject.toml](https://github.com/br3ndonland/inboard/blob/develop/pyproject.toml)_.
- [FastAPI testing](https://fastapi.tiangolo.com/tutorial/testing/) and [Starlette testing](https://www.starlette.io/testclient/) rely on the [Starlette `TestClient`](https://www.starlette.io/testclient/).
- Test coverage results are reported when invoking `pytest` from the command-line. To see interactive HTML coverage reports, invoke pytest with `pytest --cov-report=html`.
- Test coverage reports are generated within GitHub Actions workflows by [pytest-cov](https://github.com/pytest-dev/pytest-cov) with [coverage.py](https://github.com/nedbat/coveragepy), and uploaded to [Codecov](https://docs.codecov.io/docs) using [codecov/codecov-action](https://github.com/marketplace/actions/codecov). Codecov is then integrated into pull requests with the [Codecov GitHub app](https://github.com/marketplace/codecov).

Expand Down
2 changes: 1 addition & 1 deletion tests/app/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class TestEndpoints:
---
See the [FastAPI testing docs](https://fastapi.tiangolo.com/tutorial/testing/),
[Starlette TestClient docs](https://www.starlette.io/testclient/), and the
[pytest docs on parametrize](https://docs.pytest.org/en/latest/parametrize.html).
[pytest docs](https://docs.pytest.org/en/latest/how-to/parametrize.html).
"""

def test_get_asgi_uvicorn(
Expand Down

0 comments on commit aa243dd

Please # to comment.