Skip to content

Commit

Permalink
[1.5.x] Marked a test as expectedFailure on Oracle
Browse files Browse the repository at this point in the history
Backpatch of a5152bb
  • Loading branch information
akaariai committed Oct 27, 2012
1 parent fa1083f commit 7cf2858
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tests/regressiontests/introspection/tests.py
Expand Up @@ -4,10 +4,15 @@

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
Expand Down Expand Up @@ -89,7 +94,13 @@ def test_get_table_description_types(self):
[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]
Expand Down

0 comments on commit 7cf2858

Please sign in to comment.