mirror of
https://github.com/django/django.git
synced 2024-12-01 15:42:04 +01:00
Marked some tests as expected failures on Oracle/cx_Oracle<=5.1.3/Python3
Refs #23843 which is really a cx_Oracle bug
This commit is contained in:
parent
5c773447c3
commit
4a4ad27712
@ -14,6 +14,25 @@ from django.utils import six
|
||||
from .models import Author, Book, Store, DepartmentStore, Company, Employee
|
||||
|
||||
|
||||
def cxOracle_513_py3_bug(func):
|
||||
"""
|
||||
cx_Oracle versions up to and including 5.1.3 have a bug with respect to
|
||||
string handling under Python3 (essentially, they treat Python3 strings
|
||||
as Python2 strings rather than unicode). This makes some tests here
|
||||
fail under Python 3 -- so we mark them as expected failures.
|
||||
|
||||
See https://code.djangoproject.com/ticket/23843, in particular comment 6,
|
||||
which points to https://bitbucket.org/anthony_tuininga/cx_oracle/issue/6/
|
||||
"""
|
||||
from unittest import expectedFailure
|
||||
from django.db import connection
|
||||
|
||||
if connection.vendor == 'oracle' and six.PY3 and connection.Database.version <= '5.1.3':
|
||||
return expectedFailure(func)
|
||||
else:
|
||||
return func
|
||||
|
||||
|
||||
class NonAggregateAnnotationTestCase(TestCase):
|
||||
fixtures = ["annotations.json"]
|
||||
|
||||
@ -230,6 +249,7 @@ class NonAggregateAnnotationTestCase(TestCase):
|
||||
e.id, e.first_name, e.manager, e.random_value, e.last_name, e.age,
|
||||
e.salary, e.store.name, e.annotated_value))
|
||||
|
||||
@cxOracle_513_py3_bug
|
||||
def test_custom_functions(self):
|
||||
Company(name='Apple', motto=None, ticker_name='APPL', description='Beautiful Devices').save()
|
||||
Company(name='Django Software Foundation', motto=None, ticker_name=None, description=None).save()
|
||||
@ -255,6 +275,7 @@ class NonAggregateAnnotationTestCase(TestCase):
|
||||
lambda c: (c.name, c.tagline)
|
||||
)
|
||||
|
||||
@cxOracle_513_py3_bug
|
||||
def test_custom_functions_can_ref_other_functions(self):
|
||||
Company(name='Apple', motto=None, ticker_name='APPL', description='Beautiful Devices').save()
|
||||
Company(name='Django Software Foundation', motto=None, ticker_name=None, description=None).save()
|
||||
|
Loading…
Reference in New Issue
Block a user