Spaces:
Running
Running
solidprivacy-nl commited on
Commit ·
31d5b17
1
Parent(s): 045837a
Add case number pattern regression test
Browse files
tests/test_case_number_pattern_contract.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import re
|
| 2 |
+
|
| 3 |
+
from dutch_recognizers import CASE_NUMBER_VALUE_REGEX
|
| 4 |
+
from test_cases.legal_regression_cases import CASE_NUMBER_EXAMPLES
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
def test_known_case_number_shapes_match_core_case_number_regex():
|
| 8 |
+
pattern = re.compile(rf"^{CASE_NUMBER_VALUE_REGEX}$")
|
| 9 |
+
for value in CASE_NUMBER_EXAMPLES:
|
| 10 |
+
assert pattern.match(value), f"Case number shape should match: {value}"
|