Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit b821f2a6 authored by Dorian Turba's avatar Dorian Turba
Browse files

lightweight pytest README.md

parent eaed9ef5
No related branches found
No related tags found
No related merge requests found
......@@ -25,48 +25,6 @@ To add configuration to `pytest` that is shared with any other usage of pytest (
pre-commit, etc.), you can use the `pytest.ini` or `pyproject.toml` configuration files. Learn more
about [pytest configuration](https://docs.pytest.org/en/stable/customize.html) files.
Here's an example of a `pytest.ini` file:
```ini
[pytest]
minversion = 6.0
addopts = -ra -q
testpaths =
tests
```
This configuration file sets the minimum pytest version to 6.0, sets additional command line
options, and specifies the test directory.
And here's an example of pytest configuration in `pyproject.toml` (New in version 6.0.):
```python
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q"
testpaths = [
"tests",
]
```
## Change the Python version
By default, the template uses the latest Python version available in the image. If you need to
change the Python version, you can override the docker image used in the template. For example:
```yaml
stages:
- test
include:
- remote: 'https://api.r2devops.io/job/r/gitlab/dorianturba/r2devops_catalog/pytest@latest.yaml'
pytest:
image: python:3.11
```
This example uses Python 3.11 instead of the latest Python version available.
## Add a <a href="https://docs.pytest.org/en/latest/"><img alt="Tested with pytest" src="https://img.shields.io/badge/Tested%20with-pytest-green"></a> Badge to your project README.md
To display the use of pytest in your project, you can add the following badge to your README.md:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment