# HG changeset patch # User John Rouillard # Date 1616860622 14400 # Node ID 0db59cc2cd37c8efc41d5cb67aa067cc421a58c3 # Parent 6a69584d117ed83fe00e89730267c69067730659 Enable testMultilinkOrdering check. Fix back_anydbm to pass. The testMultilinkOrdering was commented out with a "some day" comment. Well some day is today. Works on anydbm and sqlite. CI will tell me if I need to fix mysql and postgres. diff -r 6a69584d117e -r 0db59cc2cd37 roundup/backends/back_anydbm.py --- a/roundup/backends/back_anydbm.py Sat Mar 27 11:55:19 2021 -0400 +++ b/roundup/backends/back_anydbm.py Sat Mar 27 11:57:02 2021 -0400 @@ -1162,7 +1162,10 @@ # return a dupe of the list so code doesn't get confused if isinstance(prop, hyperdb.Multilink): - return d[propname][:] + ids = d[propname][:] + print(ids) + ids.sort(key=lambda x: int(x)) + return ids return d[propname] diff -r 6a69584d117e -r 0db59cc2cd37 test/db_test_base.py --- a/test/db_test_base.py Sat Mar 27 11:55:19 2021 -0400 +++ b/test/db_test_base.py Sat Mar 27 11:57:02 2021 -0400 @@ -441,14 +441,14 @@ # XXX one day, maybe... -# def testMultilinkOrdering(self): -# for i in range(10): -# self.db.user.create(username='foo%s'%i) -# i = self.db.issue.create(title="spam", nosy=['5','3','12','4']) -# self.db.commit() -# l = self.db.issue.get(i, "nosy") -# # all backends should return the Multilink numeric-id-sorted -# self.assertEqual(l, ['3', '4', '5', '12']) + def testMultilinkOrdering(self): + for i in range(10): + self.db.user.create(username='foo%s'%i) + i = self.db.issue.create(title="spam", nosy=['5','3','12','4']) + self.db.commit() + l = self.db.issue.get(i, "nosy") + # all backends should return the Multilink numeric-id-sorted + self.assertEqual(l, ['3', '4', '5', '12']) # Date def testDateChange(self):