Skip to content

Commit

Permalink
tests: make pytest configuration stricter
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Sep 14, 2023
1 parent 091ee36 commit d1d47f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,18 @@ include = ["polyfactory", "tests", "examples"]
omit = ["*/tests/*"]

[tool.pytest.ini_options]
addopts = "tests docs/examples"
addopts = "--strict-config --strict-markers tests docs/examples"
asyncio_mode = "auto"
filterwarnings = [
"ignore:.*pkg_resources.declare_namespace\\('sphinxcontrib'\\).*:DeprecationWarning",
"ignore:pkg_resources is deprecated as an API:DeprecationWarning",
# Get rid those above once sphinxcontrib-mermaid doesn't use pkg_resources anymore
# https://github.com/mgaitan/sphinxcontrib-mermaid/issues/119
]
markers = [
# Marks tests that use `attrs` library
"attrs",
]

[tool.coverage.report]
exclude_lines = [
Expand Down
2 changes: 1 addition & 1 deletion tests/test_odmantic_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class MyFactory(OdmanticModelFactory[MyModel]):


@pytest.mark.skipif(sys.version_info < (3, 9), reason="flaky in python 3.8")
def test_variable_length__dict() -> None:
def test_variable_length_dict() -> None:
class MyModel(Model): # type: ignore
items: Dict[bson.Int64, UUID]

Expand Down

0 comments on commit d1d47f7

Please sign in to comment.