Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
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
cpython
Commits
0f4377c1
Kaydet (Commit)
0f4377c1
authored
Şub 21, 2013
tarafından
Ezio Melotti
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#17255: test short-circuiting behavior of any()/all(). Patch by Wim Glenn.
üst
c510a048
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
test_builtin.py
Lib/test/test_builtin.py
+2
-0
ACKS
Misc/ACKS
+1
-0
No files found.
Lib/test/test_builtin.py
Dosyayı görüntüle @
0f4377c1
...
@@ -155,6 +155,7 @@ class BuiltinTest(unittest.TestCase):
...
@@ -155,6 +155,7 @@ class BuiltinTest(unittest.TestCase):
self
.
assertRaises
(
TypeError
,
all
)
# No args
self
.
assertRaises
(
TypeError
,
all
)
# No args
self
.
assertRaises
(
TypeError
,
all
,
[
2
,
4
,
6
],
[])
# Too many args
self
.
assertRaises
(
TypeError
,
all
,
[
2
,
4
,
6
],
[])
# Too many args
self
.
assertEqual
(
all
([]),
True
)
# Empty iterator
self
.
assertEqual
(
all
([]),
True
)
# Empty iterator
self
.
assertEqual
(
all
([
0
,
TestFailingBool
()]),
False
)
# Short-circuit
S
=
[
50
,
60
]
S
=
[
50
,
60
]
self
.
assertEqual
(
all
(
x
>
42
for
x
in
S
),
True
)
self
.
assertEqual
(
all
(
x
>
42
for
x
in
S
),
True
)
S
=
[
50
,
40
,
60
]
S
=
[
50
,
40
,
60
]
...
@@ -169,6 +170,7 @@ class BuiltinTest(unittest.TestCase):
...
@@ -169,6 +170,7 @@ class BuiltinTest(unittest.TestCase):
self
.
assertRaises
(
TypeError
,
any
)
# No args
self
.
assertRaises
(
TypeError
,
any
)
# No args
self
.
assertRaises
(
TypeError
,
any
,
[
2
,
4
,
6
],
[])
# Too many args
self
.
assertRaises
(
TypeError
,
any
,
[
2
,
4
,
6
],
[])
# Too many args
self
.
assertEqual
(
any
([]),
False
)
# Empty iterator
self
.
assertEqual
(
any
([]),
False
)
# Empty iterator
self
.
assertEqual
(
any
([
1
,
TestFailingBool
()]),
True
)
# Short-circuit
S
=
[
40
,
60
,
30
]
S
=
[
40
,
60
,
30
]
self
.
assertEqual
(
any
(
x
>
42
for
x
in
S
),
True
)
self
.
assertEqual
(
any
(
x
>
42
for
x
in
S
),
True
)
S
=
[
10
,
20
,
30
]
S
=
[
10
,
20
,
30
]
...
...
Misc/ACKS
Dosyayı görüntüle @
0f4377c1
...
@@ -387,6 +387,7 @@ Jonathan Giddy
...
@@ -387,6 +387,7 @@ Jonathan Giddy
Johannes Gijsbers
Johannes Gijsbers
Michael Gilfix
Michael Gilfix
Matt Giuca
Matt Giuca
Wim Glenn
Christoph Gohlke
Christoph Gohlke
Tim Golden
Tim Golden
Guilherme Gonçalves
Guilherme Gonçalves
...
...
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