Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ummae committed May 3, 2015
1 parent 209ce27 commit c5761f6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,17 @@ def test_multiple_counters():
for col, delta in zip(columns, [1, 3, 5]):
table.counters_inc(row, [(col, delta)])
assert_equal(delta, table.counter_get(row, col))
table.counter_dec(row, [(col, delta)])
table.counter_dec(row, [(col, -delta)])
assert_equal(0, table.counter_get(row, col))

table.counters_inc(row, zip(columns, [1, 3, 5]))
table.counters_inc(row, zip(columns, [1, 3, 5]))
assert_equal([2, 6, 10], [table.counter_get(row, c) for c in columns])

table.counters_inc(row, zip(columns, [-1, -3, -5]))
table.counters_inc(row, zip(columns, [-1, -3, -5]))
assert_equal([0, 0, 0], [table.counter_get(row, c) for c in columns])


def test_batch():
with assert_raises(TypeError):
Expand Down

0 comments on commit c5761f6

Please sign in to comment.