Skip to content

Commit

Permalink
test: Add chart_error_example__additional_value_argument
Browse files Browse the repository at this point in the history
  • Loading branch information
dangotbanned committed Jan 6, 2025
1 parent e0278b1 commit 1d6c844
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/utils/test_schemapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,11 @@ def chart_error_example__additional_datum_argument():
return alt.Chart().mark_point().encode(x=alt.datum(1, wrong_argument=1))


def chart_error_example__additional_value_argument():
# Error: `ColorValue` has no parameter named 'predicate'
return alt.Chart().mark_point().encode(color=alt.value("red", predicate=True))


def chart_error_example__invalid_value_type():
# Error: Value cannot be an integer in this case
return (
Expand Down Expand Up @@ -821,6 +826,15 @@ def id_func_chart_error_example(val) -> str:
See the help for `XDatum` to read the full description of these parameters$""",
),
(
chart_error_example__additional_value_argument,
r"""`ColorValue` has no parameter named 'predicate'
Existing parameter names are:
value condition
See the help for `ColorValue` to read the full description of these parameters$""",
),
(
chart_error_example__invalid_value_type,
rf"""'1' is an invalid value for `value`. Valid values are of type {re.escape("`str | Mapping[str, Any] | None`")}.$""",
Expand Down

0 comments on commit 1d6c844

Please sign in to comment.