Skip to content

Remove dependency from pytest_django but install it in the actions that run tests for the webui#10293

Merged
ptormene merged 2 commits into
masterfrom
optional-pytest-django
Jan 28, 2025
Merged

Remove dependency from pytest_django but install it in the actions that run tests for the webui#10293
ptormene merged 2 commits into
masterfrom
optional-pytest-django

Conversation

@ptormene

@ptormene ptormene commented Jan 27, 2025

Copy link
Copy Markdown
Member

This way, pytest-django is not installed by default, so it should not disturb tests running on other repositories that install the engine.

NOTE: if pytest-django is not installed, tests raise the warning PytestConfigWarning: Unknown config option: DJANGO_SETTINGS_MODULE, but there is no error.
If pytest-django is installed, even running tests that should not use Django at all, I see a warning like:
../../openquake/lib64/python3.11/site-packages/django/conf/__init__.py:267 /home/ptormene/openquake/lib64/python3.11/site-packages/django/conf/__init__.py:267: RemovedInDjango50Warning: The USE_L10N setting is deprecated. Starting with Django 5.0, localized formatting of data will always be enabled. For example Django will display numbers and dates using the format of the current locale. warnings.warn(USE_L10N_DEPRECATED_MSG, RemovedInDjango50Warning)

@ptormene ptormene added this to the Engine 3.23.0 milestone Jan 27, 2025
@ptormene ptormene requested a review from micheles January 27, 2025 16:01
@ptormene ptormene self-assigned this Jan 27, 2025
@ptormene ptormene marked this pull request as ready for review January 28, 2025 09:30
@ptormene ptormene merged commit b9fd767 into master Jan 28, 2025
@ptormene ptormene deleted the optional-pytest-django branch January 28, 2025 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants