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
9a02ae3d
Kaydet (Commit)
9a02ae3d
authored
Haz 27, 2017
tarafından
csabella
Kaydeden (comit)
terryjreedy
Haz 27, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-24813: IDLE: Add build bitness to About Idle title (#2380)
Patch by Cheryl Sabella.
üst
a7874c73
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
6 deletions
+24
-6
help_about.py
Lib/idlelib/help_about.py
+14
-4
test_help_about.py
Lib/idlelib/idle_test/test_help_about.py
+10
-2
No files found.
Lib/idlelib/help_about.py
Dosyayı görüntüle @
9a02ae3d
...
...
@@ -2,7 +2,8 @@
"""
import
os
from
platform
import
python_version
import
sys
from
platform
import
python_version
,
architecture
from
tkinter
import
Toplevel
,
Frame
,
Label
,
Button
,
PhotoImage
from
tkinter
import
SUNKEN
,
TOP
,
BOTTOM
,
LEFT
,
X
,
BOTH
,
W
,
EW
,
NSEW
,
E
...
...
@@ -10,6 +11,14 @@ from tkinter import SUNKEN, TOP, BOTTOM, LEFT, X, BOTH, W, EW, NSEW, E
from
idlelib
import
textview
def
build_bits
():
"Return bits for platform."
if
sys
.
platform
==
'darwin'
:
return
'64'
if
sys
.
maxsize
>
2
**
32
else
'32'
else
:
return
architecture
()[
0
][:
2
]
class
AboutDialog
(
Toplevel
):
"""Modal about dialog for idle
...
...
@@ -28,11 +37,12 @@ class AboutDialog(Toplevel):
self
.
geometry
(
"+
%
d+
%
d"
%
(
parent
.
winfo_rootx
()
+
30
,
parent
.
winfo_rooty
()
+
(
30
if
not
_htest
else
100
)))
self
.
bg
=
"#
707070
"
self
.
fg
=
"#
ffffff
"
self
.
bg
=
"#
bbbbbb
"
self
.
fg
=
"#
000000
"
self
.
create_widgets
()
self
.
resizable
(
height
=
False
,
width
=
False
)
self
.
title
(
title
or
f
'About IDLE {python_version()}'
)
self
.
title
(
title
or
f
'About IDLE {python_version()} ({build_bits()} bit)'
)
self
.
transient
(
parent
)
self
.
grab_set
()
self
.
protocol
(
"WM_DELETE_WINDOW"
,
self
.
ok
)
...
...
Lib/idlelib/idle_test/test_help_about.py
Dosyayı görüntüle @
9a02ae3d
...
...
@@ -5,12 +5,15 @@ Coverage: 100%
from
test.support
import
requires
,
findfile
from
tkinter
import
Tk
,
TclError
import
unittest
from
unittest
import
mock
from
idlelib.idle_test.mock_idle
import
Func
from
idlelib.idle_test.mock_tk
import
Mbox_func
from
idlelib.help_about
import
AboutDialog
as
About
from
idlelib
import
help_about
from
idlelib
import
textview
import
os.path
from
platform
import
python_version
from
platform
import
python_version
,
architecture
class
LiveDialogTest
(
unittest
.
TestCase
):
"""Simulate user clicking buttons other than [Close].
...
...
@@ -31,6 +34,9 @@ class LiveDialogTest(unittest.TestCase):
cls
.
root
.
destroy
()
del
cls
.
root
def
test_build_bits
(
self
):
self
.
assertIn
(
help_about
.
build_bits
(),
(
'32'
,
'64'
))
def
test_dialog_title
(
self
):
"""Test about dialog title"""
self
.
assertEqual
(
self
.
dialog
.
title
(),
'About IDLE'
)
...
...
@@ -99,7 +105,9 @@ class DefaultTitleTest(unittest.TestCase):
def
test_dialog_title
(
self
):
"""Test about dialog title"""
self
.
assertEqual
(
self
.
dialog
.
title
(),
f
'About IDLE {python_version()}'
)
self
.
assertEqual
(
self
.
dialog
.
title
(),
f
'About IDLE {python_version()}'
f
' ({help_about.build_bits()} bit)'
)
class
CloseTest
(
unittest
.
TestCase
):
...
...
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