diff --git a/pyproject.toml b/pyproject.toml index 6b5039ea..15a6f72c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,3 +87,19 @@ ignore="T002,T003,T027,H006,H023,D018" max_attribute_length=200 format_css = true format_js = false + +[tool.pytest.ini_options] +DJANGO_SETTINGS_MODULE = "config.settings.test" +FAIL_INVALID_TEMPLATE_VARS = true +python_files = ["tests*.py", "test_*.py"] +filterwarnings = [ + "error", + "ignore:.*Use timezone-aware objects to represent datetimes in UTC.*:DeprecationWarning:(botocore|django_datadog_logger)", +] +addopts = [ + "--reuse-db", + "--strict-markers", +] +markers = [ + "no_django_db: mark tests that should not be marked with django_db." +] diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index 264c006d..00000000 --- a/pytest.ini +++ /dev/null @@ -1,9 +0,0 @@ -[pytest] -DJANGO_SETTINGS_MODULE = config.settings.dev -python_files = tests*.py test_*.py -addopts = - --reuse-db - --strict-markers -markers = - no_django_db: mark tests that should not be marked with django_db. -