diff options
| author | natsuoto <[email protected]> | 2026-07-15 15:26:59 +0530 |
|---|---|---|
| committer | natsuoto <[email protected]> | 2026-07-15 15:26:59 +0530 |
| commit | be086a5933d29acb63572c666deb4d5fa23e0f0e (patch) | |
| tree | 20d7bf2b8241465ae7eb93ef8eaa90c83ea41338 /tests | |
| parent | 3511e0cec7894713fa2a803466744d057d6d0dd1 (diff) | |
| download | edify-be086a5933d29acb63572c666deb4d5fa23e0f0e.tar.xz edify-be086a5933d29acb63572c666deb4d5fa23e0f0e.zip | |
fix(ci): skip re.DEBUG doc block on PyPy — hits the same upstream disassembler bug
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/docs/snapshots.test.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/docs/snapshots.test.py b/tests/docs/snapshots.test.py index f734452..75523ee 100644 --- a/tests/docs/snapshots.test.py +++ b/tests/docs/snapshots.test.py @@ -9,6 +9,7 @@ truthful. """ import re +import sys from pathlib import Path import pytest @@ -19,6 +20,8 @@ from edify import Pattern from edify.result import Regex from edify.testing import assert_snapshot +_ON_PYPY = hasattr(sys, "pypy_version_info") + _REPO_ROOT = Path(__file__).parent.parent.parent _DOCS_ROOT = _REPO_ROOT / "docs" _SNAPSHOT_ROOT = _REPO_ROOT / "tests" / "snapshots" / "docs" @@ -98,6 +101,12 @@ _BLOCKS_DEFERRED_TO_DOCS_REWRITE = frozenset( } ) +_BLOCKS_SKIPPED_ON_PYPY = frozenset( + { + ("regex-builder/flags/index", 38), + } +) + @pytest.mark.parametrize( ("rst_path", "block_start", "block_source", "relative_stem"), @@ -112,6 +121,8 @@ def test_doc_code_block_produces_the_snapshotted_regex( stem_string = str(relative_stem) if (stem_string, block_start) in _BLOCKS_DEFERRED_TO_DOCS_REWRITE: pytest.skip("doc block references validators / kwargs slated for the docs rewrite") + if _ON_PYPY and (stem_string, block_start) in _BLOCKS_SKIPPED_ON_PYPY: + pytest.skip("doc block hits PyPy's re.DEBUG upstream disassembler bug") namespace = _prepared_exec_namespace() exec(compile(block_source, str(rst_path), "exec"), namespace) rendered = _snapshot_bodies_for_block(namespace) |
