From b355fee144789d9a039a4a679436559ab5fb32d2 Mon Sep 17 00:00:00 2001 From: Bertrand Bordage Date: Mon, 6 Oct 2014 14:19:02 +0200 Subject: [PATCH] Mark a test as an expected failure instead of skipping it. --- cachalot/tests.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cachalot/tests.py b/cachalot/tests.py index 36e5871..8b59e9b 100644 --- a/cachalot/tests.py +++ b/cachalot/tests.py @@ -4,9 +4,9 @@ from __future__ import unicode_literals import datetime try: - from unittest import skip, skipIf + from unittest import skip, skipIf, expectedFailure except ImportError: # For Python 2.6 - from unittest2 import skip, skipIf + from unittest2 import skip, skipIf, expectedFailure from django.conf import settings from django.contrib.auth.models import User, Permission, Group @@ -545,8 +545,9 @@ class ReadTestCase(TestCase): self.assertListEqual(data2, data1) self.assertListEqual(data2, [self.t1, self.t2]) - @skip('For an unknown reason, we can’t measure how many requests are ' - 'executed by ``cursor.execute``.') + # FIXME: For an unknown reason, we can’t measure how many requests + # are executed by ``cursor.execute``.' + @expectedFailure def test_cursor_execute(self): """ Tests if queries executed from a DB cursor are not cached.