From e1f7c422df84d6997435c8ae25592921794dbdde Mon Sep 17 00:00:00 2001 From: flan Date: Wed, 1 Nov 2017 17:45:16 +0100 Subject: [PATCH] Show failing versions when testing _old_client() --- tests/test_sync_app.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/test_sync_app.py b/tests/test_sync_app.py index 4520592..a6d8af1 100644 --- a/tests/test_sync_app.py +++ b/tests/test_sync_app.py @@ -38,15 +38,17 @@ class SyncCollectionHandlerTest(CollectionTestBase): ','.join(('ankidesktop', '2.1.0', 'lin::')), ','.join(('ankidroid', '2.2.3', '')), ','.join(('ankidroid', '2.3alpha4', '')), + ','.join(('ankidroid', '2.3alpha5', '')), ','.join(('ankidroid', '2.9', '')), ) - # FIXME: unittest is too dumb to print the failing version for cv in old: - self.assertTrue(self.syncCollectionHandler._old_client(cv)) + if not self.syncCollectionHandler._old_client(cv): + raise AssertionError("_old_client(\"%s\") is False" % cv) for cv in current: - self.assertFalse(self.syncCollectionHandler._old_client(cv)) + if self.syncCollectionHandler._old_client(cv): + raise AssertionError("_old_client(\"%s\") is True" % cv) def test_meta(self): meta = self.syncCollectionHandler.meta()