Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /Consiliency_treesitter-chunker /tests /test_pack_pin_drift.py
| """Regression tests for the Boundary IR language-pack pin.""" | |
| from importlib import metadata | |
| import pytest | |
| from chunker._internal.pack_pin import resolve_pack_pin | |
| from tests import boundary_ir_conformance | |
| def test_resolve_pack_pin_uses_pyproject_as_the_single_source_of_truth(): | |
| assert resolve_pack_pin() == ("0.9", "0.10") | |
| assert boundary_ir_conformance.PINNED_LANGUAGE_PACK == ( | |
| ("0.9", "0.10"), | |
| "tree-sitter-language-pack", | |
| ) | |
| def test_grammar_runtime_pin_gate_rejects_pack_drift(monkeypatch, drifted_version): | |
| original_version = metadata.version | |
| def version(distribution: str) -> str: | |
| if distribution == "tree-sitter-language-pack": | |
| return drifted_version | |
| return original_version(distribution) | |
| monkeypatch.setattr(boundary_ir_conformance.metadata, "version", version) | |
| with pytest.raises(AssertionError, match="tree-sitter-language-pack"): | |
| boundary_ir_conformance.assert_grammar_runtime_pins() | |
Xet Storage Details
- Size:
- 1.05 kB
- Xet hash:
- 71ac4caa18ac586326e8e605a4c4d4af2bb181fbdbab77c12c2bc60adad31822
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.