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
3040b199
Kaydet (Commit)
3040b199
authored
Şub 17, 2005
tarafından
Walter Dörwald
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add a basic test for UserString.MutableString.
üst
8e1afab1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
test_userstring.py
Lib/test/test_userstring.py
+9
-2
No files found.
Lib/test/test_userstring.py
Dosyayı görüntüle @
3040b199
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
import
unittest
import
unittest
from
test
import
test_support
,
string_tests
from
test
import
test_support
,
string_tests
from
UserString
import
UserString
from
UserString
import
UserString
,
MutableString
class
UserStringTest
(
class
UserStringTest
(
string_tests
.
CommonTest
,
string_tests
.
CommonTest
,
...
@@ -43,8 +43,15 @@ class UserStringTest(
...
@@ -43,8 +43,15 @@ class UserStringTest(
# we don't fix the arguments, because UserString can't cope with it
# we don't fix the arguments, because UserString can't cope with it
getattr
(
object
,
methodname
)(
*
args
)
getattr
(
object
,
methodname
)(
*
args
)
class
MutableStringTest
(
UserStringTest
):
type2test
=
MutableString
# MutableStrings can be hashed => deactivate test
def
test_hash
(
self
):
pass
def
test_main
():
def
test_main
():
test_support
.
run_unittest
(
UserStringTest
)
test_support
.
run_unittest
(
UserStringTest
,
MutableStringTest
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
test_main
()
test_main
()
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