From d31257a6fbf5b5b7be6341f29dd0e066c0f762b0 Mon Sep 17 00:00:00 2001 From: Cristian Ferretti Date: Sat, 28 Oct 2023 14:09:02 -0400 Subject: [PATCH] Tweak asserts. --- py/client-ticking/tests/test_ticking_basic.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/py/client-ticking/tests/test_ticking_basic.py b/py/client-ticking/tests/test_ticking_basic.py index 0cc6fc97593..d6fbbe6c3fe 100644 --- a/py/client-ticking/tests/test_ticking_basic.py +++ b/py/client-ticking/tests/test_ticking_basic.py @@ -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