Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
fc554105
Unverified
Commit
fc554105
authored
Jun 17, 2025
by
Chang Su
Committed by
GitHub
Jun 17, 2025
Browse files
ci: Fix test_ebnf_generate_all_optional_function_params (#7288)
parent
4f204db5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
test/srt/test_ebnf_constrained.py
test/srt/test_ebnf_constrained.py
+8
-8
No files found.
test/srt/test_ebnf_constrained.py
View file @
fc554105
...
@@ -250,17 +250,17 @@ class TestEBNFConstrained(CustomTestCase):
...
@@ -250,17 +250,17 @@ class TestEBNFConstrained(CustomTestCase):
# Test patterns that should match - flexible ordering of optional parameters
# Test patterns that should match - flexible ordering of optional parameters
allowed_patterns
=
[
allowed_patterns
=
[
# Empty arguments
# Empty arguments
r
'^\{"name":"config_service",
"arguments":\{\}\}$'
,
r
'^\{"name":"config_service",
\s*
"arguments":\{\}\}$'
,
# Single optional parameters (any can appear first)
# Single optional parameters (any can appear first)
r
'^\{"name":"config_service",
"arguments":\{"theme":"(light|dark)"\}\}$'
,
r
'^\{"name":"config_service",
\s*
"arguments":\{"theme":"(light|dark)"\}\}$'
,
r
'^\{"name":"config_service",
"arguments":\{"language":"(en|es|fr)"\}\}$'
,
r
'^\{"name":"config_service",
\s*
"arguments":\{"language":"(en|es|fr)"\}\}$'
,
r
'^\{"name":"config_service",
"arguments":\{"notifications":(true|false)\}\}$'
,
r
'^\{"name":"config_service",
\s*
"arguments":\{"notifications":(true|false)\}\}$'
,
# Two optional parameters (in any order)
# Two optional parameters (in any order)
r
'^\{"name":"config_service",
"arguments":\{"theme":"(light|dark)",
"language":"(en|es|fr)"\}\}$'
,
r
'^\{"name":"config_service",
\s*
"arguments":\{"theme":"(light|dark)",
\s*
"language":"(en|es|fr)"\}\}$'
,
r
'^\{"name":"config_service",
"arguments":\{"theme":"(light|dark)",
"notifications":(true|false)\}\}$'
,
r
'^\{"name":"config_service",
\s*
"arguments":\{"theme":"(light|dark)",
\s*
"notifications":(true|false)\}\}$'
,
r
'^\{"name":"config_service",
"arguments":\{"language":"(en|es|fr)",
"notifications":(true|false)\}\}$'
,
r
'^\{"name":"config_service",
\s*
"arguments":\{"language":"(en|es|fr)",
\s*
"notifications":(true|false)\}\}$'
,
# All three optional parameters
# All three optional parameters
r
'^\{"name":"config_service",
"arguments":\{"theme":"(light|dark)",
"language":"(en|es|fr)",
"notifications":(true|false)\}\}$'
,
r
'^\{"name":"config_service",
\s*
"arguments":\{"theme":"(light|dark)",
\s*
"language":"(en|es|fr)",
\s*
"notifications":(true|false)\}\}$'
,
]
]
prompt
=
"Configure the service with optional settings:"
prompt
=
"Configure the service with optional settings:"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment