File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
aas_test_engines/test_cases/v3_0 Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -67,20 +67,20 @@ def __init__(self, raw_value: str):
67
67
self .raw_value = raw_value
68
68
if self .min_length is not None :
69
69
if len (raw_value ) < self .min_length :
70
- raise ValueError ("String is too short " )
70
+ raise ValueError (f "String is shorter than { self . min_length } characters " )
71
71
if self .max_length is not None :
72
72
if len (raw_value ) > self .max_length :
73
- raise ValueError ("String is too long " )
73
+ raise ValueError (f "String is longer than { self . max_length } characters " )
74
74
75
75
# Constraint AASd-130: An attribute with data type "string" shall be restricted to the characters as defined in
76
76
# XML Schema 1.0, i.e. the string shall consist of these characters only: ^[\x09\x0A\x0D\x20-\uD7FF\uE000-
77
77
# \uFFFD\u00010000-\u0010FFFF]*$.
78
78
if re .fullmatch (r"[\x09\x0a\x0d\x20-\ud7ff\ue000-\ufffd\U00010000-\U0010ffff]*" , raw_value ) is None :
79
- raise ValueError ("String is not XML serializable" )
79
+ raise ValueError ("Constraint AASd-130 violated: String is not XML serializable" )
80
80
81
81
if self .pattern :
82
82
if re .fullmatch (self .pattern , raw_value ) is None :
83
- raise ValueError ("String does not match pattern" )
83
+ raise ValueError (f "String does not match pattern { self . pattern } " )
84
84
85
85
def __eq__ (self , other : "StringFormattedValue" ) -> bool :
86
86
return self .raw_value == other .raw_value
You can’t perform that action at this time.
0 commit comments