From: Florimond Manca Date: Thu, 24 Jun 2021 10:15:59 +0000 (+0200) Subject: Allow passing additional pytest args to scripts/test (#1710) X-Git-Tag: 0.19.0~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d192aed45440eeb4fcc1cf0a519c018dad62a2d;p=thirdparty%2Fhttpx.git Allow passing additional pytest args to scripts/test (#1710) --- diff --git a/docs/contributing.md b/docs/contributing.md index e1a953dc..74472575 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -71,10 +71,12 @@ $ scripts/test The test suite spawns testing servers on ports **8000** and **8001**. Make sure these are not in use, so the tests can run properly. -You can run a single test script like this: +Any additional arguments will be passed to `pytest`. See the [pytest documentation](https://docs.pytest.org/en/latest/how-to/usage.html) for more information. + +For example, to run a single test script: ```shell -$ scripts/test -- tests/test_multipart.py +$ scripts/test tests/test_multipart.py ``` To run the code auto-formatting: diff --git a/scripts/test b/scripts/test index f7f32ad1..d778a544 100755 --- a/scripts/test +++ b/scripts/test @@ -11,7 +11,7 @@ if [ -z $GITHUB_ACTIONS ]; then scripts/check fi -${PREFIX}coverage run -m pytest +${PREFIX}coverage run -m pytest "$@" if [ -z $GITHUB_ACTIONS ]; then scripts/coverage