Skip to content

Commit

Permalink
add more tests for column_slice
Browse files Browse the repository at this point in the history
  • Loading branch information
yymao committed Apr 26, 2019
1 parent 34b22cb commit 21a19e5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ def test_filter_column_slice():
t = gen_test_table()
q = Query('a > 2')
assert (q.filter(t, 'b') == t['b'][t['a'] > 2]).all()
assert (q.filter(t, 'c') == t['c'][t['a'] > 2]).all()
q = Query('a > 2', 'b < 2')
assert (q.filter(t, 'c') == t['c'][(t['a'] > 2) & (t['b'] < 2)]).all()
q = Query(None)
assert (q.filter(t, 'a') == t['a']).all()


if __name__ == '__main__':
Expand Down

0 comments on commit 21a19e5

Please sign in to comment.