Merge branch 'dev' into runny827
feat(training): 新增精益培训视频与周任务管理 # Conflicts: # backend/app/models/__init__.py
This commit is contained in:
1 parent
85d27e9ffa
commit
91b7233872
812 files changed
+73763
-18908
No files matched your search
@@ -56,6 +56,24 @@ def test_reservation_contract_only_accepts_five_or_ten_digits():
|
||||
assert not is_valid_reservation_id("12345678901", numeric_only=True)
|
||||
|
||||
|
||||
def test_validated_reservation_id_strips_optional_parenthesized_note():
|
||||
"""完整数字可带括号备注;括号内容不是预约单号,普通尾随文本仍拒绝。"""
|
||||
assert validated_reservation_id("3000112934(PENROSE)") == "3000112934"
|
||||
assert validated_reservation_id("3000112934(PENROSE)") == "3000112934"
|
||||
assert validated_reservation_id("R2 @3000112934") == "3000112934"
|
||||
assert validated_reservation_id("R2 @3000112934(PENROSE)") == "3000112934"
|
||||
assert validated_reservation_id("R2 @3000112934 PENROSE") == ""
|
||||
assert validated_reservation_id("3000112934 PENROSE") == ""
|
||||
assert validated_reservation_id("abc3000112934(PENROSE)") == ""
|
||||
assert validated_reservation_id("00011293") == ""
|
||||
assert validated_reservation_id("30001129345") == ""
|
||||
|
||||
|
||||
def test_validated_reservation_id_rejects_amount_text_as_numeric_token():
|
||||
"""金额行中的五位整数片段不能被当成 Reservation ID。"""
|
||||
assert validated_reservation_id("941.76 28,252.80") == ""
|
||||
|
||||
|
||||
def test_reservation_region_maps_line_when_reservation_label_and_line_number_are_present():
|
||||
"""专用区域只在同一行有 Reservation 语义时提取,并将可靠行号交给正式解析链路。"""
|
||||
assert extract_reservation_from_region_text("Reservation#3000098851 for line#1") == [{
|
||||
|
||||
Reference in new issue
Block a user