Spaces:
Sleeping
Sleeping
solidprivacy-nl commited on
Commit ·
cfa6718
1
Parent(s): 48ed660
Use contextual value regex for case reference contract
Browse files
tests/test_case_number_pattern_contract.py
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
-
import
|
| 2 |
-
|
| 3 |
-
from candidate_scanner import CASE_NUMBER_VALUE_RE_PART
|
| 4 |
from test_cases.legal_regression_cases import CASE_NUMBER_EXAMPLES
|
| 5 |
|
| 6 |
|
| 7 |
-
def
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
for value in CASE_NUMBER_EXAMPLES:
|
| 10 |
-
assert
|
|
|
|
| 1 |
+
from candidate_scanner import CONTEXTUAL_VALUE_RE
|
|
|
|
|
|
|
| 2 |
from test_cases.legal_regression_cases import CASE_NUMBER_EXAMPLES
|
| 3 |
|
| 4 |
|
| 5 |
+
def test_known_case_number_shapes_match_contextual_reference_value_regex():
|
| 6 |
+
"""Case-number values include formal shapes and context-bound admin codes.
|
| 7 |
+
|
| 8 |
+
GEM-HLM-2026-2210 is a zaaknummer because the surrounding label says so,
|
| 9 |
+
even though the raw value has a generic administrative-code shape.
|
| 10 |
+
"""
|
| 11 |
for value in CASE_NUMBER_EXAMPLES:
|
| 12 |
+
assert CONTEXTUAL_VALUE_RE.fullmatch(value), f"Case/reference value shape should match: {value}"
|