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
92af06bb
Kaydet (Commit)
92af06bb
authored
Şub 02, 2014
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #19320: Fixed split/splitlist tests in test_tcl for Tcl 8.5.0-8.5.5.
üst
091d386f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
5 deletions
+28
-5
test_tcl.py
Lib/test/test_tcl.py
+28
-5
No files found.
Lib/test/test_tcl.py
Dosyayı görüntüle @
92af06bb
...
...
@@ -21,6 +21,21 @@ except ValueError:
pass
tcl_version
=
tuple
(
tcl_version
)
_tk_patchlevel
=
None
def
get_tk_patchlevel
():
global
_tk_patchlevel
if
_tk_patchlevel
is
None
:
tcl
=
Tcl
()
patchlevel
=
[]
for
x
in
tcl
.
call
(
'info'
,
'patchlevel'
)
.
split
(
'.'
):
try
:
x
=
int
(
x
,
10
)
except
ValueError
:
x
=
-
1
patchlevel
.
append
(
x
)
_tk_patchlevel
=
tuple
(
patchlevel
)
return
_tk_patchlevel
class
TkinterTest
(
unittest
.
TestCase
):
...
...
@@ -259,10 +274,14 @@ class TclTest(unittest.TestCase):
(
'1'
,
'2'
,
'3.4'
)),
]
if
tcl_version
>=
(
8
,
5
):
if
not
self
.
wantobjects
or
get_tk_patchlevel
()
<
(
8
,
5
,
5
):
# Before 8.5.5 dicts were converted to lists through string
expected
=
(
'12'
,
'
\u20ac
'
,
'
\u20ac
'
,
'3.4'
)
else
:
expected
=
(
12
,
'
\u20ac
'
,
'
\u20ac
'
,
(
3.4
,))
testcases
+=
[
(
call
(
'dict'
,
'create'
,
1
,
'
\u20ac
'
,
b
'
\xe2\x82\xac
'
,
(
3.4
,)),
(
1
,
'
\u20ac
'
,
'
\u20ac
'
,
(
3.4
,))
if
self
.
wantobjects
else
(
'1'
,
'
\u20ac
'
,
'
\u20ac
'
,
'3.4'
)),
(
call
(
'dict'
,
'create'
,
12
,
'
\u20ac
'
,
b
'
\xe2\x82\xac
'
,
(
3.4
,)),
expected
),
]
for
arg
,
res
in
testcases
:
self
.
assertEqual
(
splitlist
(
arg
),
res
,
msg
=
arg
)
...
...
@@ -299,10 +318,14 @@ class TclTest(unittest.TestCase):
(
'1'
,
'2'
,
'3.4'
)),
]
if
tcl_version
>=
(
8
,
5
):
if
not
self
.
wantobjects
or
get_tk_patchlevel
()
<
(
8
,
5
,
5
):
# Before 8.5.5 dicts were converted to lists through string
expected
=
(
'12'
,
'
\u20ac
'
,
'
\u20ac
'
,
'3.4'
)
else
:
expected
=
(
12
,
'
\u20ac
'
,
'
\u20ac
'
,
(
3.4
,))
testcases
+=
[
(
call
(
'dict'
,
'create'
,
12
,
'
\u20ac
'
,
b
'
\xe2\x82\xac
'
,
(
3.4
,)),
(
12
,
'
\u20ac
'
,
'
\u20ac
'
,
(
3.4
,))
if
self
.
wantobjects
else
(
'12'
,
'
\u20ac
'
,
'
\u20ac
'
,
'3.4'
)),
expected
),
]
for
arg
,
res
in
testcases
:
self
.
assertEqual
(
split
(
arg
),
res
,
msg
=
arg
)
...
...
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