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
4e41a4b6
Kaydet (Commit)
4e41a4b6
authored
Agu 03, 2005
tarafından
Walter Dörwald
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Disable a few other tests, that can't work if Python is compiled without
Unicode support.
üst
649f8e7d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
18 deletions
+30
-18
test_builtin.py
Lib/test/test_builtin.py
+14
-5
test_isinstance.py
Lib/test/test_isinstance.py
+2
-1
test_sys.py
Lib/test/test_sys.py
+2
-1
test_textwrap.py
Lib/test/test_textwrap.py
+12
-11
No files found.
Lib/test/test_builtin.py
Dosyayı görüntüle @
4e41a4b6
...
@@ -582,14 +582,16 @@ class BuiltinTest(unittest.TestCase):
...
@@ -582,14 +582,16 @@ class BuiltinTest(unittest.TestCase):
self
.
assertRaises
(
TypeError
,
getattr
,
sys
,
1
)
self
.
assertRaises
(
TypeError
,
getattr
,
sys
,
1
)
self
.
assertRaises
(
TypeError
,
getattr
,
sys
,
1
,
"foo"
)
self
.
assertRaises
(
TypeError
,
getattr
,
sys
,
1
,
"foo"
)
self
.
assertRaises
(
TypeError
,
getattr
)
self
.
assertRaises
(
TypeError
,
getattr
)
self
.
assertRaises
(
UnicodeError
,
getattr
,
sys
,
unichr
(
sys
.
maxunicode
))
if
have_unicode
:
self
.
assertRaises
(
UnicodeError
,
getattr
,
sys
,
unichr
(
sys
.
maxunicode
))
def
test_hasattr
(
self
):
def
test_hasattr
(
self
):
import
sys
import
sys
self
.
assert_
(
hasattr
(
sys
,
'stdout'
))
self
.
assert_
(
hasattr
(
sys
,
'stdout'
))
self
.
assertRaises
(
TypeError
,
hasattr
,
sys
,
1
)
self
.
assertRaises
(
TypeError
,
hasattr
,
sys
,
1
)
self
.
assertRaises
(
TypeError
,
hasattr
)
self
.
assertRaises
(
TypeError
,
hasattr
)
self
.
assertRaises
(
UnicodeError
,
hasattr
,
sys
,
unichr
(
sys
.
maxunicode
))
if
have_unicode
:
self
.
assertRaises
(
UnicodeError
,
hasattr
,
sys
,
unichr
(
sys
.
maxunicode
))
def
test_hash
(
self
):
def
test_hash
(
self
):
hash
(
None
)
hash
(
None
)
...
@@ -1101,7 +1103,8 @@ class BuiltinTest(unittest.TestCase):
...
@@ -1101,7 +1103,8 @@ class BuiltinTest(unittest.TestCase):
if
have_unicode
:
if
have_unicode
:
self
.
assertEqual
(
ord
(
unichr
(
sys
.
maxunicode
)),
sys
.
maxunicode
)
self
.
assertEqual
(
ord
(
unichr
(
sys
.
maxunicode
)),
sys
.
maxunicode
)
self
.
assertRaises
(
TypeError
,
ord
,
42
)
self
.
assertRaises
(
TypeError
,
ord
,
42
)
self
.
assertRaises
(
TypeError
,
ord
,
unicode
(
"12"
))
if
have_unicode
:
self
.
assertRaises
(
TypeError
,
ord
,
unicode
(
"12"
))
def
test_pow
(
self
):
def
test_pow
(
self
):
self
.
assertEqual
(
pow
(
0
,
0
),
1
)
self
.
assertEqual
(
pow
(
0
,
0
),
1
)
...
@@ -1494,11 +1497,17 @@ class TestSorted(unittest.TestCase):
...
@@ -1494,11 +1497,17 @@ class TestSorted(unittest.TestCase):
def
test_inputtypes
(
self
):
def
test_inputtypes
(
self
):
s
=
'abracadabra'
s
=
'abracadabra'
for
T
in
[
unicode
,
list
,
tuple
]:
types
=
[
list
,
tuple
]
if
have_unicode
:
types
.
insert
(
0
,
unicode
)
for
T
in
types
:
self
.
assertEqual
(
sorted
(
s
),
sorted
(
T
(
s
)))
self
.
assertEqual
(
sorted
(
s
),
sorted
(
T
(
s
)))
s
=
''
.
join
(
dict
.
fromkeys
(
s
)
.
keys
())
# unique letters only
s
=
''
.
join
(
dict
.
fromkeys
(
s
)
.
keys
())
# unique letters only
for
T
in
[
unicode
,
set
,
frozenset
,
list
,
tuple
,
dict
.
fromkeys
]:
types
=
[
set
,
frozenset
,
list
,
tuple
,
dict
.
fromkeys
]
if
have_unicode
:
types
.
insert
(
0
,
unicode
)
for
T
in
types
:
self
.
assertEqual
(
sorted
(
s
),
sorted
(
T
(
s
)))
self
.
assertEqual
(
sorted
(
s
),
sorted
(
T
(
s
)))
def
test_baddecorator
(
self
):
def
test_baddecorator
(
self
):
...
...
Lib/test/test_isinstance.py
Dosyayı görüntüle @
4e41a4b6
...
@@ -243,7 +243,8 @@ class TestIsInstanceIsSubclass(unittest.TestCase):
...
@@ -243,7 +243,8 @@ class TestIsInstanceIsSubclass(unittest.TestCase):
self
.
assertEqual
(
True
,
issubclass
(
NewSuper
,
(
NewChild
,
(
NewSuper
,))))
self
.
assertEqual
(
True
,
issubclass
(
NewSuper
,
(
NewChild
,
(
NewSuper
,))))
self
.
assertEqual
(
True
,
issubclass
(
int
,
(
long
,
(
float
,
int
))))
self
.
assertEqual
(
True
,
issubclass
(
int
,
(
long
,
(
float
,
int
))))
self
.
assertEqual
(
True
,
issubclass
(
str
,
(
unicode
,
(
Child
,
NewChild
,
basestring
))))
if
test_support
.
have_unicode
:
self
.
assertEqual
(
True
,
issubclass
(
str
,
(
unicode
,
(
Child
,
NewChild
,
basestring
))))
def
test_subclass_recursion_limit
(
self
):
def
test_subclass_recursion_limit
(
self
):
# make sure that issubclass raises RuntimeError before the C stack is
# make sure that issubclass raises RuntimeError before the C stack is
...
...
Lib/test/test_sys.py
Dosyayı görüntüle @
4e41a4b6
...
@@ -247,7 +247,8 @@ class SysModuleTest(unittest.TestCase):
...
@@ -247,7 +247,8 @@ class SysModuleTest(unittest.TestCase):
self
.
assert_
(
isinstance
(
sys
.
executable
,
basestring
))
self
.
assert_
(
isinstance
(
sys
.
executable
,
basestring
))
self
.
assert_
(
isinstance
(
sys
.
hexversion
,
int
))
self
.
assert_
(
isinstance
(
sys
.
hexversion
,
int
))
self
.
assert_
(
isinstance
(
sys
.
maxint
,
int
))
self
.
assert_
(
isinstance
(
sys
.
maxint
,
int
))
self
.
assert_
(
isinstance
(
sys
.
maxunicode
,
int
))
if
test
.
test_support
.
have_unicode
:
self
.
assert_
(
isinstance
(
sys
.
maxunicode
,
int
))
self
.
assert_
(
isinstance
(
sys
.
platform
,
basestring
))
self
.
assert_
(
isinstance
(
sys
.
platform
,
basestring
))
self
.
assert_
(
isinstance
(
sys
.
prefix
,
basestring
))
self
.
assert_
(
isinstance
(
sys
.
prefix
,
basestring
))
self
.
assert_
(
isinstance
(
sys
.
version
,
basestring
))
self
.
assert_
(
isinstance
(
sys
.
version
,
basestring
))
...
...
Lib/test/test_textwrap.py
Dosyayı görüntüle @
4e41a4b6
...
@@ -328,17 +328,18 @@ What a mess!
...
@@ -328,17 +328,18 @@ What a mess!
self
.
check_wrap
(
text
,
30
,
self
.
check_wrap
(
text
,
30
,
[
" This is a sentence with"
,
"leading whitespace."
])
[
" This is a sentence with"
,
"leading whitespace."
])
def
test_unicode
(
self
):
if
test_support
.
have_unicode
:
# *Very* simple test of wrapping Unicode strings. I'm sure
def
test_unicode
(
self
):
# there's more to it than this, but let's at least make
# *Very* simple test of wrapping Unicode strings. I'm sure
# sure textwrap doesn't crash on Unicode input!
# there's more to it than this, but let's at least make
text
=
u"Hello there, how are you today?"
# sure textwrap doesn't crash on Unicode input!
self
.
check_wrap
(
text
,
50
,
[
u"Hello there, how are you today?"
])
text
=
u"Hello there, how are you today?"
self
.
check_wrap
(
text
,
20
,
[
u"Hello there, how are"
,
"you today?"
])
self
.
check_wrap
(
text
,
50
,
[
u"Hello there, how are you today?"
])
olines
=
self
.
wrapper
.
wrap
(
text
)
self
.
check_wrap
(
text
,
20
,
[
u"Hello there, how are"
,
"you today?"
])
assert
isinstance
(
olines
,
list
)
and
isinstance
(
olines
[
0
],
unicode
)
olines
=
self
.
wrapper
.
wrap
(
text
)
otext
=
self
.
wrapper
.
fill
(
text
)
assert
isinstance
(
olines
,
list
)
and
isinstance
(
olines
[
0
],
unicode
)
assert
isinstance
(
otext
,
unicode
)
otext
=
self
.
wrapper
.
fill
(
text
)
assert
isinstance
(
otext
,
unicode
)
def
test_split
(
self
):
def
test_split
(
self
):
# Ensure that the standard _split() method works as advertised
# Ensure that the standard _split() method works as advertised
...
...
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