tests: constrain http pytest to tests/http directory

Running the http pytest had to be done from tests directory or above,
because the repeat argument fixture was defined in tests/conftest.py.
However, the repeat argument is not needed because its functionality
can be provided by pytest-repeat as documented in the test's
README.md. So, removed the pytest_addoption function for the repeat
argument and the pytest_report_header function is moved to
tests/http/conftest.py.

TODO: Remove repeat argument from all tests. As a stopgap, a
one-element list is defined for it for now.

Closes #14611
This commit is contained in:
Jan Venekamp 2024-08-21 19:54:19 +02:00 committed by Daniel Stenberg
parent aeb1a281ca
commit a4152864f8
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
6 changed files with 34 additions and 72 deletions

View file

@ -470,7 +470,7 @@ jobs:
env:
TFLAGS: "${{ matrix.build.tflags }}"
- run: pytest -v tests
- run: pytest -v tests/http
name: 'run pytest'
env:
TFLAGS: "${{ matrix.build.tflags }}"

View file

@ -487,10 +487,10 @@ jobs:
make V=1 VERBOSE=1 test-ci
- if: contains(matrix.build.install_steps, 'pytest')
# run for `tests` directory, so pytest does not pick up any other
# run for `tests/http` directory, so pytest does not pick up any other
# packages we might have built here
run:
pytest -v tests
pytest -v tests/http
name: 'run pytest'
env:
TFLAGS: "${{ matrix.build.tflags }}"