fix tests
This commit is contained in:
parent
b3e6550c0e
commit
cf92178c82
2 changed files with 5 additions and 4 deletions
|
|
@ -231,7 +231,7 @@ class RegexOptions(OptionsDictValidator):
|
|||
return False
|
||||
for capture_group_default in regex_options.capture_group_defaults or []:
|
||||
parsed_default = parse(capture_group_default.format_string)
|
||||
if parsed_default.variables.issubset(unresolved_variables):
|
||||
if parsed_default.variables and parsed_default.variables.issubset(unresolved_variables):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
|
|
|||
|
|
@ -313,7 +313,8 @@ class TestRegex:
|
|||
with pytest.raises(
|
||||
ValidationException,
|
||||
match=re.escape(
|
||||
"cannot use 'uid' as a capture group name because it is a defined variable"
|
||||
"Cannot use the variable name uid because it exists as a built-in "
|
||||
"ytdl-sub variable name."
|
||||
),
|
||||
):
|
||||
_ = Subscription.from_dict(
|
||||
|
|
@ -333,8 +334,8 @@ class TestRegex:
|
|||
with pytest.raises(
|
||||
ValidationException,
|
||||
match=re.escape(
|
||||
"cannot use 'contains_regex_default' as a capture group name because it is a "
|
||||
"defined variable"
|
||||
"Override variable with name contains_regex_default cannot be used since it is "
|
||||
"added by a plugin."
|
||||
),
|
||||
):
|
||||
_ = Subscription.from_dict(
|
||||
|
|
|
|||
Loading…
Reference in a new issue