File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 11from __future__ import annotations
2+ import importlib
3+ import typing
24from unittest .mock import AsyncMock , MagicMock
35
46import litestar
57import pytest
68
9+ import microbootstrap .settings
710from microbootstrap import (
811 FastApiPrometheusConfig ,
912 LitestarPrometheusConfig ,
@@ -95,3 +98,9 @@ def async_mock() -> AsyncMock:
9598@pytest .fixture
9699def console_writer () -> ConsoleWriter :
97100 return ConsoleWriter (writer_enabled = False )
101+
102+
103+ @pytest .fixture
104+ def reset_reloaded_settings_module () -> typing .Iterator [None ]:
105+ yield
106+ importlib .reload (microbootstrap .settings )
Original file line number Diff line number Diff line change 11import importlib
2- import typing
32
43import pytest
54
65import microbootstrap .settings
76
87
9- @pytest .fixture
10- def _reset_reloaded_settings_module () -> typing .Iterator [None ]:
11- yield
12- importlib .reload (microbootstrap .settings )
8+ pytestmark = [pytest .mark .usefixtures ("reset_reloaded_settings_module" )]
139
1410
1511@pytest .mark .parametrize ("alias" , ["SERVICE_NAME" , "MY_SERVICE_SERVICE_NAME" ])
You can’t perform that action at this time.
0 commit comments