File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from __future__ import annotations
22
33import json
4+ import sys
45from dataclasses import asdict
56from pathlib import Path
67
8+ import pytest
9+
710from codeclone .extractor import extract_units_from_source
811from codeclone .normalize import NormalizationConfig
912from codeclone .report import build_block_groups , build_groups
1013from codeclone .scanner import module_name_from_path
1114
15+ CANONICAL_GOLDEN_PYTHON_TAG = "cp313"
16+
17+
18+ def _runtime_python_tag () -> str :
19+ impl = sys .implementation .name
20+ major , minor = sys .version_info [:2 ]
21+ prefix = "cp" if impl == "cpython" else impl [:2 ]
22+ return f"{ prefix } { major } { minor } "
23+
24+
25+ pytestmark = pytest .mark .skipif (
26+ _runtime_python_tag () != CANONICAL_GOLDEN_PYTHON_TAG ,
27+ reason = (
28+ "Golden detector fixture is canonicalized for "
29+ f"{ CANONICAL_GOLDEN_PYTHON_TAG } ; run contract/invariant tests on other tags."
30+ ),
31+ )
32+
1233
1334def _detect_group_keys (project_root : Path ) -> tuple [list [str ], list [str ]]:
1435 cfg = NormalizationConfig ()
You can’t perform that action at this time.
0 commit comments