Skip to content

Commit

Permalink
Merge pull request #1143 from fedarko/master
Browse files Browse the repository at this point in the history
Update test_predicates to include field predicates
  • Loading branch information
jakevdp authored Sep 22, 2018
2 parents d71af34 + b09bf6d commit 2bca553
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion altair/vegalite/v2/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,11 @@ def condition(predicate, if_true, if_false, **kwargs):
core.SelectionAnd, core.SelectionOperand)
test_predicates = (six.string_types, expr.Expression, core.Predicate,
core.LogicalOperandPredicate, core.LogicalNotPredicate,
core.LogicalOrPredicate, core.LogicalAndPredicate)
core.LogicalOrPredicate, core.LogicalAndPredicate,
core.FieldEqualPredicate, core.FieldOneOfPredicate,
core.FieldRangePredicate, core.FieldLTPredicate,
core.FieldGTPredicate, core.FieldLTEPredicate,
core.FieldGTEPredicate, core.SelectionPredicate)

if isinstance(predicate, NamedSelection):
condition = {'selection': predicate._get_name()}
Expand Down

0 comments on commit 2bca553

Please sign in to comment.