Skip to content

Commit

Permalink
Mark flaky test on with xfail
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Nov 20, 2023
1 parent 3bd67c0 commit 21366ce
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion setuptools/tests/test_logging.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import inspect
import logging
import os
import sys

import pytest


IS_PYPY = '__pypy__' in sys.builtin_module_names


setup_py = """\
from setuptools import setup
Expand Down Expand Up @@ -50,4 +54,10 @@ def test_patching_does_not_cause_problems():
# Modern logging infra, no problematic patching.
assert isinstance(dist.log, logging.Logger)
else:
assert inspect.ismodule(dist.log)
try:
assert inspect.ismodule(dist.log)
except AssertionError: # pragma: no cover
if IS_PYPY:
pytest.xfail("Flaky monkeypatch on PyPy")

raise

0 comments on commit 21366ce

Please sign in to comment.