Skip to content

Commit

Permalink
test(typing): Wrap returned "immutable" TypedDict before modifying
Browse files Browse the repository at this point in the history
This isn't a runtime concern, just to satisfy typing
  • Loading branch information
dangotbanned committed Sep 16, 2024
1 parent 0a6d599 commit 7865c91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/vegalite/v5/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def test_when_then_otherwise() -> None:
when_then = alt.when(select).then(alt.value(2, empty=False))
when_then_otherwise = when_then.otherwise(alt.value(0))

expected = alt.condition(select, alt.value(2, empty=False), alt.value(0))
expected = dict(alt.condition(select, alt.value(2, empty=False), alt.value(0)))
with pytest.raises(TypeError, match="list"):
when_then.otherwise([1, 2, 3]) # type: ignore

Expand Down

0 comments on commit 7865c91

Please sign in to comment.