The `log` table being used for testing Mnemosyne is causing similar errors due to having not enough rows.

19 views
Skip to first unread message

Ace Alba

unread,
Jul 20, 2023, 10:31:06 AM7/20/23
to mnemosyne-proj-users
Hi. Novice program here. I am currently working through the tests being used in Mnemosyne, and I've encountered 5 errors that are caused by one thing: the `log` table only having 10 entries.

The tests producing the errors are as follows:

[ ] test_add_cards.TestAddCards.test_log - Time: 0.030 seconds [ @error ]
[ ] test_database.TestDatabase.test_add_tag_to_card - Time: 0.031 seconds [ @error ]
[ ] test_database.TestDatabase.test_remove_tag_from_card - Time: 0.033 seconds [ @error ]
[ ] test_database.TestDatabase.test_remove_tag_from_card_2 - Time: 0.031 seconds [ @error ]
 [ ] test_database.TestDatabase.test_remove_tag_from_card_3 - Time: 0.030 seconds [ @error ]

All the tests above involve a sql_res variable that stores the results of a query. However, the queries all attempt to access _ids greater than 10.

On the other hand, the log table only contains the following 9 entries.

(1, 1, 1689843657, 'Mnemosyne 2.10.1 posix linux TZ 8', None, None, None, None, None, None, None, None, None, None, None, None)
(2, 3, 1689843657, 'SM2 Mnemosyne', None, None, None, None, None, None, None, None, None, None, None, None)
(3, 4, 1689843657, 'oQs2z2unkQSumDymKRVOVr', None, None, 0, 0, 0, None, None, None, None, None, None, None)
(4, 10, 1689843657, 'YeDBHgYY0Tn5T5EqFBuZ1b', None, None, None, None, None, None, None, None, None, None, None, None)
(5, 26, 1689843657, '__DEFAULT__', None, None, None, None, None, None, None, None, None, None, None, None)
(6, 16, 1689843657, 'SV20MWG04MplrnwZKOBBYL', None, None, None, None, None, None, None, None, None, None, None, None)
(7, 6, 1689843657, 'YSp4oOpiLMSbmnmDoi4UnU', None, None, None, None, None, None, None, None, None, None, None, None)
(8, 9, 1689843657, 'YSp4oOpiLMSbmnmDoi4UnU', 3, 2.5, 1, 0, 0, 1, 0, 0, 0, 0, 1690156800, 0)
(9, 5, 1689843657, 'oQs2z2unkQSumDymKRVOVr', None, None, 0, 0, 0, None, None, None, None, None, None, None)

The errors can be easily fixed by adjusting the query to the proper _id. However, I would like to ask if the log table is intended to only contain 9 entries, or if I missed something in the process. Thanks.

Peter Bienstman

unread,
Jul 24, 2023, 5:36:55 AM7/24/23
to mnemosyne-...@googlegroups.com
Hi,

I'm afraid the test suite is a bit out of date, and should also be
ported to a new testing framework...

Kind regards,

Peter
> --
> You received this message because you are subscribed to the Google Groups "mnemosyne-proj-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mnemosyne-proj-u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/mnemosyne-proj-users/e081a910-c3c1-4427-ad50-4c96e481edfdn%40googlegroups.com.

Ace Alba

unread,
Jul 24, 2023, 11:07:06 PM7/24/23
to mnemosyne-proj-users
Yeah, I read that as well.  Migrating to a new test suite (i.e. nose2) seems to be a larger endeavor for my skill set, so I wanted to see if the tests are doing fine before I attempt porting it to a new framework (or going through the to-do lists or adding/fixing some features). 

I'll see what I can do with the tests, and explain any changes I may have added. Thanks.
Reply all
Reply to author
Forward
0 new messages