Skip to content

Instantly share code, notes, and snippets.

@thinkjrs
Created September 4, 2020 11:23
Show Gist options
  • Select an option

  • Save thinkjrs/eccc2390ae9daa0623f297db174c0f0e to your computer and use it in GitHub Desktop.

Select an option

Save thinkjrs/eccc2390ae9daa0623f297db174c0f0e to your computer and use it in GitHub Desktop.
Stack overflow answers I've deleted for some reason or other.
Pytest uses the same `-W` warning flags as @anakhand mentioned in comment. So, to disable warnings you should be able add the following flag to your pytest invokation:
```python
pytest -Wignore
```
To make this automagic add to your `pytest.ini`:
```python
[pytest]
addopts = -p no:warnings
```
Hope that helps. See [the pytest docs](https://docs.pytest.org/en/stable/warnings.html).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment