Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ jobs:
- "3.13"
- "3.14"
- "3.15"
- "pypy3.10"
- "pypy3.11"
Comment thread
tomasr8 marked this conversation as resolved.
Resolved
- "pypy3.12"
env:
BABEL_CLDR_NO_DOWNLOAD_PROGRESS: "1"
BABEL_CLDR_QUIET: "1"
Expand Down
16 changes: 15 additions & 1 deletion conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import os
from pathlib import Path
from unittest import mock

from _pytest.doctest import DoctestModule
import pytest
from _pytest.doctest import DoctestItem, DoctestModule

collect_ignore = [
'babel/messages/setuptools_frontend.py',
Expand All @@ -21,3 +24,14 @@ def _is_relative(p1: Path, p2: Path) -> bool:
def pytest_collect_file(file_path: Path, parent):
if _is_relative(file_path, babel_path) and file_path.suffix == '.py':
return DoctestModule.from_parent(parent, path=file_path)


@pytest.fixture(autouse=True)
Comment thread
tomasr8 marked this conversation as resolved.
Resolved
def _isolate_doctest_environ(request):
# Clean up after after doctests that modify environment
# variables (e.g. core.default_locale)
if isinstance(request.node, DoctestItem):
with mock.patch.dict(os.environ):
yield
else:
yield
7 changes: 0 additions & 7 deletions tests/messages/test_setuptools_frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ def test_extract_distutils_keyword_arg_388(kwarg, expected):
assert set(cmdinst.add_comments) == {"Bar", "Foo"}


@pytest.mark.xfail(
# Python 3.10.16[pypy-7.3.19-final] in GHA fails with "unsupported locale setting"
# in the subprocesses this test spawns. Hard to say why because it doesn't do that
# locally.
condition=(sys.implementation.name == "pypy" and "BABEL_TOX_INI_DIR" in os.environ),
reason="Test will likely fail with 'unsupported locale setting' in subprocesses; see comment",
)
def test_setuptools_commands(tmp_path, monkeypatch):
"""
Smoke-tests all of the setuptools versions of the commands in turn.
Expand Down
Loading