Skip to content

Commit

Permalink
Tweak asserts.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcferretti committed Oct 28, 2023
1 parent e7da532 commit d31257a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion py/client-ticking/tests/test_ticking_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ def test_ticking_basic_time_table(self):
def update_table_added(added):
nonlocal table_added_update_count
nonlocal table_added_last_col1_seen
table_added_update_count += 1
if not added:
# Only allow the initial snapshot (if it was fast enough) to be empty.
self.assertTrue(table_added_update_count == 1)
return
for value in added['Col1'].to_pylist():
prev = table_added_last_col1_seen
table_added_last_col1_seen = value
if prev != -1:
self.assertTrue(prev + 1 == table_added_last_col1_seen)
table_added_update_count += 1
listener_handle = dh.listen(table, lambda update : update_table_added(update.added('Col1')))
listener_handle.start()
seen_rows = 0
Expand Down

0 comments on commit d31257a

Please sign in to comment.