Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Marked a test as expectedFailure on Oracle

  • Loading branch information...
commit a5152bb64677fb9b976f6b35e80b11b368ef1e08 1 parent c159d9c
Anssi Kääriäinen authored October 27, 2012
15  tests/regressiontests/introspection/tests.py
@@ -4,10 +4,15 @@
4 4
 
5 5
 from django.db import connection
6 6
 from django.test import TestCase, skipUnlessDBFeature, skipIfDBFeature
7  
-from django.utils import six
  7
+from django.utils import six, unittest
8 8
 
9 9
 from .models import Reporter, Article
10 10
 
  11
+if connection.vendor == 'oracle':
  12
+    expectedFailureOnOracle = unittest.expectedFailure
  13
+else:
  14
+    expectedFailureOnOracle = lambda f: f
  15
+
11 16
 #
12 17
 # The introspection module is optional, so methods tested here might raise
13 18
 # NotImplementedError. This is perfectly acceptable behavior for the backend
@@ -89,7 +94,13 @@ def test_get_table_description_types(self):
89 94
             [datatype(r[1], r) for r in desc],
90 95
             ['IntegerField', 'CharField', 'CharField', 'CharField', 'BigIntegerField']
91 96
         )
92  
-        # Check also length of CharFields
  97
+
  98
+    # The following test fails on Oracle due to #17202 (can't correctly
  99
+    # inspect the length of character columns).
  100
+    @expectedFailureOnOracle
  101
+    def test_get_table_description_col_lengths(self):
  102
+        cursor = connection.cursor()
  103
+        desc = connection.introspection.get_table_description(cursor, Reporter._meta.db_table)
93 104
         self.assertEqual(
94 105
             [r[3] for r in desc if datatype(r[1], r) == 'CharField'],
95 106
             [30, 30, 75]

0 notes on commit a5152bb

Please sign in to comment.
Something went wrong with that request. Please try again.