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
ab4fd444
Kaydet (Commit)
ab4fd444
authored
May 19, 2014
tarafından
Terry Jan Reedy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #21477: idle htests - lower case function names, other cleanups.
üst
ae4bab71
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
27 deletions
+26
-27
EditorWindow.py
Lib/idlelib/EditorWindow.py
+7
-7
htest.py
Lib/idlelib/idle_test/htest.py
+19
-20
No files found.
Lib/idlelib/EditorWindow.py
Dosyayı görüntüle @
ab4fd444
...
...
@@ -79,7 +79,7 @@ class HelpDialog(object):
self
.
parent
=
None
helpDialog
=
HelpDialog
()
# singleton instance
def
_
H
elp_dialog
(
parent
):
# wrapper for htest
def
_
h
elp_dialog
(
parent
):
# wrapper for htest
helpDialog
.
show_dialog
(
parent
)
...
...
@@ -1702,21 +1702,21 @@ def fixwordbreaks(root):
tk
.
call
(
'set'
,
'tcl_nonwordchars'
,
'[^a-zA-Z0-9_]'
)
def
_
E
ditor_window
(
parent
):
def
_
e
ditor_window
(
parent
):
root
=
parent
fixwordbreaks
(
root
)
root
.
withdraw
()
##
root.withdraw()
if
sys
.
argv
[
1
:]:
filename
=
sys
.
argv
[
1
]
else
:
filename
=
None
macosxSupport
.
setupApp
(
root
,
None
)
edit
=
EditorWindow
(
root
=
root
,
filename
=
filename
)
edit
.
set_close_hook
(
root
.
quit
)
edit
.
text
.
bind
(
"<<close-all-windows>>"
,
edit
.
close_event
)
##
edit.set_close_hook(root.quit)
##
edit.text.bind("<<close-all-windows>>", edit.close_event)
if
__name__
==
'__main__'
:
from
idlelib.idle_test.htest
import
run
if
len
(
sys
.
argv
)
<=
1
:
run
(
_
H
elp_dialog
)
run
(
_
E
ditor_window
)
run
(
_
h
elp_dialog
)
run
(
_
e
ditor_window
)
Lib/idlelib/idle_test/htest.py
Dosyayı görüntüle @
ab4fd444
...
...
@@ -13,10 +13,10 @@ if __name__ == '__main__':
The X object must have a .__name__ attribute and a 'parent' parameter.
X will often be a widget class, but a callable instance with .__name__
or a wrapper function also work. The name of wrapper functions, like
'_
E
ditor_Window', should start with '_'.
'_
e
ditor_Window', should start with '_'.
This file must contain a matching instance of the folling template,
with X.__name__ prepended, as in '_
E
ditor_window_spec ...'.
with X.__name__ prepended, as in '_
e
ditor_window_spec ...'.
_spec = {
'file': '',
...
...
@@ -33,19 +33,6 @@ msg: displayed in a master window. Hints as to how the user might
from
importlib
import
import_module
import
tkinter
as
tk
_Editor_window_spec
=
{
'file'
:
'EditorWindow'
,
'kwds'
:
{},
'msg'
:
"Test editor functions of interest"
}
_Help_dialog_spec
=
{
'file'
:
'EditorWindow'
,
'kwds'
:
{},
'msg'
:
"If the help text displays, this works"
}
AboutDialog_spec
=
{
'file'
:
'aboutDialog'
,
'kwds'
:
{
'title'
:
'About test'
},
...
...
@@ -53,15 +40,27 @@ AboutDialog_spec = {
}
_editor_window_spec
=
{
'file'
:
'EditorWindow'
,
'kwds'
:
{},
'msg'
:
"Test editor functions of interest"
}
GetCfgSectionNameDialog_spec
=
{
'file'
:
'configSectionNameDialog'
,
'kwds'
:
{
'title'
:
'Get Name'
,
'message'
:
'Enter something'
,
'used_names'
:
{
'abc'
},
'_htest'
:
True
},
'message'
:
'Enter something'
,
'used_names'
:
{
'abc'
},
'_htest'
:
True
},
'msg'
:
"After the text entered with [Ok] is stripped, <nothing>, "
"'abc', or more that 30 chars are errors.
\n
"
"Close 'Get Name' with a valid entry (printed to Shell), [Cancel], or [X]"
,
"'abc', or more that 30 chars are errors.
\n
"
"Close 'Get Name' with a valid entry (printed to Shell), [Cancel], or [X]"
,
}
_help_dialog_spec
=
{
'file'
:
'EditorWindow'
,
'kwds'
:
{},
'msg'
:
"If the help text displays, this works"
}
def
run
(
test
):
...
...
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