Skip to content

Commit

Permalink
Ensure that any/in/all work
Browse files Browse the repository at this point in the history
  • Loading branch information
jjdelc committed Jun 6, 2024
1 parent 70511b1 commit feef5c2
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions scrunch/tests/test_expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,28 @@ def test_mr_any_subvar(self):
]
}

def test_mr_all_subvar(self):
expr = "MyMrVar.all([subvar1, subvar2])"
expr_obj = parse_expr(expr)
assert expr_obj == {
'function': 'all',
'args': [
{'variable': 'MyMrVar'},
{'column': ['subvar1', 'subvar2']}
]
}

def test_mr_in_subvar(self):
expr = "MyMrVar in [subvar1, subvar2]"
expr_obj = parse_expr(expr)
assert expr_obj == {
'function': 'in',
'args': [
{'variable': 'MyMrVar'},
{'column': ['subvar1', 'subvar2']}
]
}

def test_parse_sample_any(self):
# 'text': 'CompanyTurnover is NA',
# 'index_mapper': {'CompanyTurnover': any([99])}},
Expand Down

0 comments on commit feef5c2

Please sign in to comment.