Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
f9636fdf
Kaydet (Commit)
f9636fdf
authored
Agu 14, 2015
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #23843 -- Updated Oracle annotations workaround to reflect latest status.
üst
6bd7ee4e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
15 deletions
+8
-15
tests.py
tests/annotations/tests.py
+8
-15
No files found.
tests/annotations/tests.py
Dosyayı görüntüle @
f9636fdf
...
...
@@ -16,23 +16,16 @@ from .models import (
)
def
cxOracle_
513_
py3_bug
(
func
):
def
cxOracle_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/
There's a bug in Django/cx_Oracle with respect to string handling under
Python 3 (essentially, they treat Python 3 strings as Python 2 strings
rather than unicode). This makes some tests here fail under Python 3, so
we mark them as expected failures until someone fixes them in #23843.
"""
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
return
expectedFailure
(
func
)
if
connection
.
vendor
==
'oracle'
and
six
.
PY3
else
func
class
NonAggregateAnnotationTestCase
(
TestCase
):
...
...
@@ -387,7 +380,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
@cxOracle_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
()
...
...
@@ -413,7 +406,7 @@ class NonAggregateAnnotationTestCase(TestCase):
lambda
c
:
(
c
.
name
,
c
.
tagline
)
)
@cxOracle_
513_
py3_bug
@cxOracle_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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment