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
b1a2ad69
Kaydet (Commit)
b1a2ad69
authored
Şub 09, 2019
tarafından
Sergey Fedoseev
Kaydeden (comit)
Tim Graham
Şub 09, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed uneeded iter() calls with generator expression as argument.
üst
b8c48d06
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
tests.py
tests/backends/tests.py
+4
-4
test_logging.py
tests/template_tests/test_logging.py
+1
-1
No files found.
tests/backends/tests.py
Dosyayı görüntüle @
b1a2ad69
...
...
@@ -249,11 +249,11 @@ class BackendTestCase(TransactionTestCase):
def
test_cursor_executemany_with_iterator
(
self
):
# Test executemany accepts iterators #10320
args
=
iter
((
i
,
i
**
2
)
for
i
in
range
(
-
3
,
2
))
args
=
((
i
,
i
**
2
)
for
i
in
range
(
-
3
,
2
))
self
.
create_squares_with_executemany
(
args
)
self
.
assertEqual
(
Square
.
objects
.
count
(),
5
)
args
=
iter
((
i
,
i
**
2
)
for
i
in
range
(
3
,
7
))
args
=
((
i
,
i
**
2
)
for
i
in
range
(
3
,
7
))
with
override_settings
(
DEBUG
=
True
):
# same test for DebugCursorWrapper
self
.
create_squares_with_executemany
(
args
)
...
...
@@ -278,11 +278,11 @@ class BackendTestCase(TransactionTestCase):
@skipUnlessDBFeature
(
'supports_paramstyle_pyformat'
)
def
test_cursor_executemany_with_pyformat_iterator
(
self
):
args
=
iter
({
'root'
:
i
,
'square'
:
i
**
2
}
for
i
in
range
(
-
3
,
2
))
args
=
({
'root'
:
i
,
'square'
:
i
**
2
}
for
i
in
range
(
-
3
,
2
))
self
.
create_squares
(
args
,
'pyformat'
,
multiple
=
True
)
self
.
assertEqual
(
Square
.
objects
.
count
(),
5
)
args
=
iter
({
'root'
:
i
,
'square'
:
i
**
2
}
for
i
in
range
(
3
,
7
))
args
=
({
'root'
:
i
,
'square'
:
i
**
2
}
for
i
in
range
(
3
,
7
))
with
override_settings
(
DEBUG
=
True
):
# same test for DebugCursorWrapper
self
.
create_squares
(
args
,
'pyformat'
,
multiple
=
True
)
...
...
tests/template_tests/test_logging.py
Dosyayı görüntüle @
b1a2ad69
...
...
@@ -25,7 +25,7 @@ class VariableResolveLoggingTests(SimpleTestCase):
raise
TestObject
.
SilentDoesNotExist
(
"Attribute does not exist."
)
def
__iter__
(
self
):
return
iter
(
attr
for
attr
in
dir
(
TestObject
)
if
attr
[:
2
]
!=
"__"
)
return
(
attr
for
attr
in
dir
(
TestObject
)
if
attr
[:
2
]
!=
"__"
)
def
__getitem__
(
self
,
item
):
return
self
.
__dict__
[
item
]
...
...
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