Skip to content

Commit

Permalink
Add missing contextmanager to decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Nov 20, 2023
1 parent 6173290 commit e4bca36
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions setuptools/tests/test_logging.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import inspect
import logging
import sys
from contextlib import contextmanager

import pytest

Expand Down Expand Up @@ -41,7 +42,8 @@ def test_verbosity_level(tmp_path, monkeypatch, flag, expected_level):
assert log_level_name == expected_level


def _flaky_on_pypy(func):
@contextmanager
def flaky_on_pypy(func):
try:
func()
except AssertionError: # pragma: no cover
Expand All @@ -51,7 +53,7 @@ def _flaky_on_pypy(func):
raise


@_flaky_on_pypy
@flaky_on_pypy
def test_patching_does_not_cause_problems():
# Ensure `dist.log` is only patched if necessary

Expand Down

0 comments on commit e4bca36

Please sign in to comment.