summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAnssi Kääriäinen <akaariai@gmail.com>2012-10-27 18:10:02 +0300
committerAnssi Kääriäinen <akaariai@gmail.com>2012-10-27 18:34:18 +0300
commita5152bb64677fb9b976f6b35e80b11b368ef1e08 (patch)
treefe503410411ff5398dd111bd6c719bb4606cc6f6 /tests
parentc159d9cec0baab7bbd04d5d51a92a51e354a722a (diff)
Marked a test as expectedFailure on Oracle
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/introspection/tests.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/regressiontests/introspection/tests.py b/tests/regressiontests/introspection/tests.py
index a54e0c670b..4b8a3277e2 100644
--- a/tests/regressiontests/introspection/tests.py
+++ b/tests/regressiontests/introspection/tests.py
@@ -4,10 +4,15 @@ from functools import update_wrapper
from django.db import connection
from django.test import TestCase, skipUnlessDBFeature, skipIfDBFeature
-from django.utils import six
+from django.utils import six, unittest
from .models import Reporter, Article
+if connection.vendor == 'oracle':
+ expectedFailureOnOracle = unittest.expectedFailure
+else:
+ expectedFailureOnOracle = lambda f: f
+
#
# The introspection module is optional, so methods tested here might raise
# NotImplementedError. This is perfectly acceptable behavior for the backend
@@ -89,7 +94,13 @@ class IntrospectionTests(six.with_metaclass(IgnoreNotimplementedError, TestCase)
[datatype(r[1], r) for r in desc],
['IntegerField', 'CharField', 'CharField', 'CharField', 'BigIntegerField']
)
- # Check also length of CharFields
+
+ # The following test fails on Oracle due to #17202 (can't correctly
+ # inspect the length of character columns).
+ @expectedFailureOnOracle
+ def test_get_table_description_col_lengths(self):
+ cursor = connection.cursor()
+ desc = connection.introspection.get_table_description(cursor, Reporter._meta.db_table)
self.assertEqual(
[r[3] for r in desc if datatype(r[1], r) == 'CharField'],
[30, 30, 75]