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
0caf6d85
Kaydet (Commit)
0caf6d85
authored
Şub 22, 2007
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix test_iter after the dict views conversion.
üst
eb6b0eec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
BROKEN
BROKEN
+1
-1
test_iter.py
Lib/test/test_iter.py
+7
-7
No files found.
BROKEN
Dosyayı görüntüle @
0caf6d85
test_bsddb test_bsddb3 test_compile test_dumbdbm
test_bsddb test_bsddb3 test_compile test_dumbdbm
test_importhooks
test_iter
test_importhooks
Lib/test/test_iter.py
Dosyayı görüntüle @
0caf6d85
...
@@ -225,7 +225,7 @@ class TestCase(unittest.TestCase):
...
@@ -225,7 +225,7 @@ class TestCase(unittest.TestCase):
dict
=
{}
dict
=
{}
for
i
in
range
(
10
):
for
i
in
range
(
10
):
dict
[
i
]
=
None
dict
[
i
]
=
None
self
.
check_for_loop
(
dict
,
dict
.
keys
(
))
self
.
check_for_loop
(
dict
,
list
(
dict
.
keys
()
))
# Test a file
# Test a file
def
test_iter_file
(
self
):
def
test_iter_file
(
self
):
...
@@ -254,7 +254,7 @@ class TestCase(unittest.TestCase):
...
@@ -254,7 +254,7 @@ class TestCase(unittest.TestCase):
self
.
assertEqual
(
list
(
range
(
10
,
-
1
,
-
1
)),
range
(
10
,
-
1
,
-
1
))
self
.
assertEqual
(
list
(
range
(
10
,
-
1
,
-
1
)),
range
(
10
,
-
1
,
-
1
))
d
=
{
"one"
:
1
,
"two"
:
2
,
"three"
:
3
}
d
=
{
"one"
:
1
,
"two"
:
2
,
"three"
:
3
}
self
.
assertEqual
(
list
(
d
),
d
.
keys
(
))
self
.
assertEqual
(
list
(
d
),
list
(
d
.
keys
()
))
self
.
assertRaises
(
TypeError
,
list
,
list
)
self
.
assertRaises
(
TypeError
,
list
,
list
)
self
.
assertRaises
(
TypeError
,
list
,
42
)
self
.
assertRaises
(
TypeError
,
list
,
42
)
...
@@ -319,7 +319,7 @@ class TestCase(unittest.TestCase):
...
@@ -319,7 +319,7 @@ class TestCase(unittest.TestCase):
self
.
assertEqual
(
filter
(
None
,
"abc"
),
"abc"
)
self
.
assertEqual
(
filter
(
None
,
"abc"
),
"abc"
)
d
=
{
"one"
:
1
,
"two"
:
2
,
"three"
:
3
}
d
=
{
"one"
:
1
,
"two"
:
2
,
"three"
:
3
}
self
.
assertEqual
(
filter
(
None
,
d
),
d
.
keys
(
))
self
.
assertEqual
(
filter
(
None
,
d
),
list
(
d
.
keys
()
))
self
.
assertRaises
(
TypeError
,
filter
,
None
,
list
)
self
.
assertRaises
(
TypeError
,
filter
,
None
,
list
)
self
.
assertRaises
(
TypeError
,
filter
,
None
,
42
)
self
.
assertRaises
(
TypeError
,
filter
,
None
,
42
)
...
@@ -393,9 +393,9 @@ class TestCase(unittest.TestCase):
...
@@ -393,9 +393,9 @@ class TestCase(unittest.TestCase):
self
.
assertEqual
(
map
(
lambda
x
:
x
+
1
,
SequenceClass
(
5
)),
range
(
1
,
6
))
self
.
assertEqual
(
map
(
lambda
x
:
x
+
1
,
SequenceClass
(
5
)),
range
(
1
,
6
))
d
=
{
"one"
:
1
,
"two"
:
2
,
"three"
:
3
}
d
=
{
"one"
:
1
,
"two"
:
2
,
"three"
:
3
}
self
.
assertEqual
(
map
(
None
,
d
),
d
.
keys
(
))
self
.
assertEqual
(
map
(
None
,
d
),
list
(
d
.
keys
()
))
self
.
assertEqual
(
map
(
lambda
k
,
d
=
d
:
(
k
,
d
[
k
]),
d
),
d
.
items
(
))
self
.
assertEqual
(
map
(
lambda
k
,
d
=
d
:
(
k
,
d
[
k
]),
d
),
list
(
d
.
items
()
))
dkeys
=
d
.
keys
(
)
dkeys
=
list
(
d
.
keys
()
)
expected
=
[(
i
<
len
(
d
)
and
dkeys
[
i
]
or
None
,
expected
=
[(
i
<
len
(
d
)
and
dkeys
[
i
]
or
None
,
i
,
i
,
i
<
len
(
d
)
and
dkeys
[
i
]
or
None
)
i
<
len
(
d
)
and
dkeys
[
i
]
or
None
)
...
@@ -437,7 +437,7 @@ class TestCase(unittest.TestCase):
...
@@ -437,7 +437,7 @@ class TestCase(unittest.TestCase):
[(
0
,),
(
1
,),
(
2
,)])
[(
0
,),
(
1
,),
(
2
,)])
d
=
{
"one"
:
1
,
"two"
:
2
,
"three"
:
3
}
d
=
{
"one"
:
1
,
"two"
:
2
,
"three"
:
3
}
self
.
assertEqual
(
d
.
items
(
),
list
(
zip
(
d
,
d
.
values
())))
self
.
assertEqual
(
list
(
d
.
items
()
),
list
(
zip
(
d
,
d
.
values
())))
# Generate all ints starting at constructor arg.
# Generate all ints starting at constructor arg.
class
IntsFrom
:
class
IntsFrom
:
...
...
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