Skip to content

Commit 862356d

Browse files
authored
Update test_conflicting_formatters.py
1 parent a113d1b commit 862356d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/test_conflicting_formatters.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@
1717
def patched_run(formatters: list[Formatter]) -> Generator[type[_Run], None, None]:
1818
"""Patches the _Run class to use only the provided formatters."""
1919
old_formatters = _formatting.FORMATTERS
20-
try:
21-
_formatting.FORMATTERS = formatters
22-
yield _Run
23-
finally:
24-
_formatting.FORMATTERS = old_formatters
20+
_formatting.FORMATTERS = formatters
21+
yield _Run
22+
_formatting.FORMATTERS = old_formatters
2523

2624

2725
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)