Skip to content

Commit

Permalink
Merge pull request #912 from cderici/register-custom-pytest-marks
Browse files Browse the repository at this point in the history
#912

#### Description

Add a `.pytest.ini` at the top level to register custom pytest marks to prevent pytest from emitting warnings for each mark, such as:

```
tests/unit/test_model.py:371: 24 warnings
 /home/caner/work/python-libjuju/tests/unit/test_model.py:371: PytestUnknownMarkWarning: Unknown pytest.mark.wait_for_idle - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
 @pytest.mark.wait_for_idle
```

#### QA Steps

No QA needed.

Needs to be forward-ported to the main branch. Proactively added the `bundle` mark as it's used in there.
  • Loading branch information
jujubot committed Jul 19, 2023
2 parents e9e1ea1 + 2d48750 commit b79d066
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .pytest.ini
@@ -0,0 +1,4 @@
[pytest]
markers =
bundle: tests about bundles
wait_for_idle: tests about wait_for_idle behavior

0 comments on commit b79d066

Please sign in to comment.