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
dfdae021
Kaydet (Commit)
dfdae021
authored
Kas 24, 2014
tarafından
Berker Peksag
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #16056: Rename test methods to avoid conflict.
üst
8a9c682d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
59 deletions
+1
-59
test_ftplib.py
Lib/test/test_ftplib.py
+0
-4
test_unicode.py
Lib/test/test_unicode.py
+1
-1
test_weakset.py
Lib/test/test_weakset.py
+0
-54
No files found.
Lib/test/test_ftplib.py
Dosyayı görüntüle @
dfdae021
...
@@ -484,10 +484,6 @@ class TestFTPClass(TestCase):
...
@@ -484,10 +484,6 @@ class TestFTPClass(TestCase):
dir
=
self
.
client
.
cwd
(
'/foo'
)
dir
=
self
.
client
.
cwd
(
'/foo'
)
self
.
assertEqual
(
dir
,
'250 cwd ok'
)
self
.
assertEqual
(
dir
,
'250 cwd ok'
)
def
test_mkd
(
self
):
dir
=
self
.
client
.
mkd
(
'/foo'
)
self
.
assertEqual
(
dir
,
'/foo'
)
def
test_pwd
(
self
):
def
test_pwd
(
self
):
dir
=
self
.
client
.
pwd
()
dir
=
self
.
client
.
pwd
()
self
.
assertEqual
(
dir
,
'pwd ok'
)
self
.
assertEqual
(
dir
,
'pwd ok'
)
...
...
Lib/test/test_unicode.py
Dosyayı görüntüle @
dfdae021
...
@@ -484,7 +484,7 @@ class UnicodeTest(
...
@@ -484,7 +484,7 @@ class UnicodeTest(
u'X
\U00010427
X
\U00010427
'
)
u'X
\U00010427
X
\U00010427
'
)
@requires_wide_build
@requires_wide_build
def
test_capitalize
(
self
):
def
test_capitalize
_wide_build
(
self
):
string_tests
.
CommonTest
.
test_capitalize
(
self
)
string_tests
.
CommonTest
.
test_capitalize
(
self
)
self
.
assertEqual
(
u'
\U0001044F
'
.
capitalize
(),
u'
\U00010427
'
)
self
.
assertEqual
(
u'
\U0001044F
'
.
capitalize
(),
u'
\U00010427
'
)
self
.
assertEqual
(
u'
\U0001044F\U0001044F
'
.
capitalize
(),
self
.
assertEqual
(
u'
\U0001044F\U0001044F
'
.
capitalize
(),
...
...
Lib/test/test_weakset.py
Dosyayı görüntüle @
dfdae021
...
@@ -11,7 +11,6 @@ import warnings
...
@@ -11,7 +11,6 @@ import warnings
import
collections
import
collections
import
gc
import
gc
import
contextlib
import
contextlib
from
UserString
import
UserString
as
ustr
class
Foo
:
class
Foo
:
...
@@ -449,59 +448,6 @@ class TestWeakSet(unittest.TestCase):
...
@@ -449,59 +448,6 @@ class TestWeakSet(unittest.TestCase):
self
.
assertGreaterEqual
(
n2
,
0
)
self
.
assertGreaterEqual
(
n2
,
0
)
self
.
assertLessEqual
(
n2
,
n1
)
self
.
assertLessEqual
(
n2
,
n1
)
def
test_weak_destroy_while_iterating
(
self
):
# Issue #7105: iterators shouldn't crash when a key is implicitly removed
# Create new items to be sure no-one else holds a reference
items
=
[
ustr
(
c
)
for
c
in
(
'a'
,
'b'
,
'c'
)]
s
=
WeakSet
(
items
)
it
=
iter
(
s
)
next
(
it
)
# Trigger internal iteration
# Destroy an item
del
items
[
-
1
]
gc
.
collect
()
# just in case
# We have removed either the first consumed items, or another one
self
.
assertIn
(
len
(
list
(
it
)),
[
len
(
items
),
len
(
items
)
-
1
])
del
it
# The removal has been committed
self
.
assertEqual
(
len
(
s
),
len
(
items
))
def
test_weak_destroy_and_mutate_while_iterating
(
self
):
# Issue #7105: iterators shouldn't crash when a key is implicitly removed
items
=
[
ustr
(
c
)
for
c
in
string
.
ascii_letters
]
s
=
WeakSet
(
items
)
@contextlib.contextmanager
def
testcontext
():
try
:
it
=
iter
(
s
)
# Start iterator
yielded
=
ustr
(
str
(
next
(
it
)))
# Schedule an item for removal and recreate it
u
=
ustr
(
str
(
items
.
pop
()))
if
yielded
==
u
:
# The iterator still has a reference to the removed item,
# advance it (issue #20006).
next
(
it
)
gc
.
collect
()
# just in case
yield
u
finally
:
it
=
None
# should commit all removals
with
testcontext
()
as
u
:
self
.
assertFalse
(
u
in
s
)
with
testcontext
()
as
u
:
self
.
assertRaises
(
KeyError
,
s
.
remove
,
u
)
self
.
assertFalse
(
u
in
s
)
with
testcontext
()
as
u
:
s
.
add
(
u
)
self
.
assertTrue
(
u
in
s
)
t
=
s
.
copy
()
with
testcontext
()
as
u
:
s
.
update
(
t
)
self
.
assertEqual
(
len
(
s
),
len
(
t
))
with
testcontext
()
as
u
:
s
.
clear
()
self
.
assertEqual
(
len
(
s
),
0
)
def
test_main
(
verbose
=
None
):
def
test_main
(
verbose
=
None
):
test_support
.
run_unittest
(
TestWeakSet
)
test_support
.
run_unittest
(
TestWeakSet
)
...
...
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