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
731b1b12
Kaydet (Commit)
731b1b12
authored
Nis 10, 2016
tarafından
Martin Panter
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove relics of str8 (became bytes) and buffer (bytearray) type tests
Remove redundant tests now that str is unicode.
üst
0d0db6cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
33 deletions
+0
-33
string_tests.py
Lib/test/string_tests.py
+0
-33
No files found.
Lib/test/string_tests.py
Dosyayı görüntüle @
731b1b12
...
@@ -645,14 +645,6 @@ class BaseTest:
...
@@ -645,14 +645,6 @@ class BaseTest:
EQ
(
"bobobXbobob"
,
"bobobobXbobobob"
,
"replace"
,
"bobob"
,
"bob"
)
EQ
(
"bobobXbobob"
,
"bobobobXbobobob"
,
"replace"
,
"bobob"
,
"bob"
)
EQ
(
"BOBOBOB"
,
"BOBOBOB"
,
"replace"
,
"bob"
,
"bobby"
)
EQ
(
"BOBOBOB"
,
"BOBOBOB"
,
"replace"
,
"bob"
,
"bobby"
)
# XXX Commented out. Is there any reason to support buffer objects
# as arguments for str.replace()? GvR
## ba = bytearray('a')
## bb = bytearray('b')
## EQ("bbc", "abc", "replace", ba, bb)
## EQ("aac", "abc", "replace", bb, ba)
#
self
.
checkequal
(
'one@two!three!'
,
'one!two!three!'
,
'replace'
,
'!'
,
'@'
,
1
)
self
.
checkequal
(
'one@two!three!'
,
'one!two!three!'
,
'replace'
,
'!'
,
'@'
,
1
)
self
.
checkequal
(
'onetwothree'
,
'one!two!three!'
,
'replace'
,
'!'
,
''
)
self
.
checkequal
(
'onetwothree'
,
'one!two!three!'
,
'replace'
,
'!'
,
''
)
self
.
checkequal
(
'one@two@three!'
,
'one!two!three!'
,
'replace'
,
'!'
,
'@'
,
2
)
self
.
checkequal
(
'one@two@three!'
,
'one!two!three!'
,
'replace'
,
'!'
,
'@'
,
2
)
...
@@ -1389,28 +1381,3 @@ class MixinStrUnicodeTest:
...
@@ -1389,28 +1381,3 @@ class MixinStrUnicodeTest:
s1
=
t
(
"abcd"
)
s1
=
t
(
"abcd"
)
s2
=
t
()
.
join
([
s1
])
s2
=
t
()
.
join
([
s1
])
self
.
assertIs
(
s1
,
s2
)
self
.
assertIs
(
s1
,
s2
)
# Should also test mixed-type join.
if
t
is
str
:
s1
=
subclass
(
"abcd"
)
s2
=
""
.
join
([
s1
])
self
.
assertIsNot
(
s1
,
s2
)
self
.
assertIs
(
type
(
s2
),
t
)
s1
=
t
(
"abcd"
)
s2
=
""
.
join
([
s1
])
self
.
assertIs
(
s1
,
s2
)
## elif t is str8:
## s1 = subclass("abcd")
## s2 = "".join([s1])
## self.assertIsNot(s1, s2)
## self.assertIs(type(s2), str) # promotes!
## s1 = t("abcd")
## s2 = "".join([s1])
## self.assertIsNot(s1, s2)
## self.assertIs(type(s2), str) # promotes!
else
:
self
.
fail
(
"unexpected type for MixinStrUnicodeTest
%
r"
%
t
)
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