From 250b89be6048d3137575c07fa51331e03270a8d6 Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Sun, 10 Jan 2021 16:25:52 +0100 Subject: [PATCH] Adjust pyblib test_find --- pylib/tests/test_find.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pylib/tests/test_find.py b/pylib/tests/test_find.py index e7adfafec..e82163b48 100644 --- a/pylib/tests/test_find.py +++ b/pylib/tests/test_find.py @@ -193,6 +193,7 @@ def test_findCards(): assert len(col.findCards("-prop:ease>2")) > 1 # recently failed if not isNearCutoff(): + # rated assert len(col.findCards("rated:1:1")) == 0 assert len(col.findCards("rated:1:2")) == 0 c = col.sched.getCard() @@ -204,13 +205,14 @@ def test_findCards(): assert len(col.findCards("rated:1:1")) == 1 assert len(col.findCards("rated:1:2")) == 1 assert len(col.findCards("rated:1")) == 2 - assert len(col.findCards("rated:0:2")) == 0 assert len(col.findCards("rated:2:2")) == 1 + assert len(col.findCards("rated:0")) == len(col.findCards("rated:1")) + # added - assert len(col.findCards("added:0")) == 0 col.db.execute("update cards set id = id - 86400*1000 where id = ?", id) assert len(col.findCards("added:1")) == col.cardCount() - 1 assert len(col.findCards("added:2")) == col.cardCount() + assert len(col.findCards("added:0")) == len(col.findCards("added:1")) else: print("some find tests disabled near cutoff") # empty field