Unverified Commit fc554105 authored by Chang Su's avatar Chang Su Committed by GitHub
Browse files

ci: Fix test_ebnf_generate_all_optional_function_params (#7288)

parent 4f204db5
...@@ -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:"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment