Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isolate settings context before first test #158

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Security

## [0.24.1] - 2024-04-17

### Fixed

- isolate settings context before first test

## [0.24.0] - 2024-04-12

### Added
Expand Down
5 changes: 4 additions & 1 deletion mex/common/testing/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,11 @@ def settings() -> BaseSettings:


@pytest.fixture(autouse=True)
def isolate_settings() -> Generator[None, None, None]:
def isolate_settings(
isolate_assets_dir: None, isolate_work_dir: None
) -> Generator[None, None, None]:
"""Automatically reset the settings singleton store."""
SETTINGS_STORE.reset()
yield
SETTINGS_STORE.reset()

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "mex-common"
version = "0.24.0"
version = "0.24.1"
description = "Common library for MEx python projects."
authors = [{ name = "MEx Team", email = "[email protected]" }]
readme = { file = "README.md", content-type = "text/markdown" }
Expand Down