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
5f30f793
Kaydet (Commit)
5f30f793
authored
Eyl 01, 2016
tarafından
Terry Jan Reedy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #27922: IDLE tests no longer flash tk widgets (Merge 3.5).
üst
a3623c86
00b1e0f7
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
21 additions
and
6 deletions
+21
-6
test_config_key.py
Lib/idlelib/idle_test/test_config_key.py
+1
-0
test_configdialog.py
Lib/idlelib/idle_test/test_configdialog.py
+1
-0
test_editmenu.py
Lib/idlelib/idle_test/test_editmenu.py
+1
-0
test_history.py
Lib/idlelib/idle_test/test_history.py
+1
-0
test_hyperparser.py
Lib/idlelib/idle_test/test_hyperparser.py
+1
-0
test_macosx.py
Lib/idlelib/idle_test/test_macosx.py
+2
-0
test_query.py
Lib/idlelib/idle_test/test_query.py
+4
-0
test_redirector.py
Lib/idlelib/idle_test/test_redirector.py
+2
-0
test_textview.py
Lib/idlelib/idle_test/test_textview.py
+8
-6
No files found.
Lib/idlelib/idle_test/test_config_key.py
Dosyayı görüntüle @
5f30f793
...
@@ -14,6 +14,7 @@ class GetKeysTest(unittest.TestCase):
...
@@ -14,6 +14,7 @@ class GetKeysTest(unittest.TestCase):
@classmethod
@classmethod
def
setUpClass
(
cls
):
def
setUpClass
(
cls
):
cls
.
root
=
Tk
()
cls
.
root
=
Tk
()
cls
.
root
.
withdraw
()
@classmethod
@classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
...
...
Lib/idlelib/idle_test/test_configdialog.py
Dosyayı görüntüle @
5f30f793
...
@@ -14,6 +14,7 @@ class ConfigDialogTest(unittest.TestCase):
...
@@ -14,6 +14,7 @@ class ConfigDialogTest(unittest.TestCase):
@classmethod
@classmethod
def
setUpClass
(
cls
):
def
setUpClass
(
cls
):
cls
.
root
=
Tk
()
cls
.
root
=
Tk
()
cls
.
root
.
withdraw
()
@classmethod
@classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
...
...
Lib/idlelib/idle_test/test_editmenu.py
Dosyayı görüntüle @
5f30f793
...
@@ -17,6 +17,7 @@ class PasteTest(unittest.TestCase):
...
@@ -17,6 +17,7 @@ class PasteTest(unittest.TestCase):
@classmethod
@classmethod
def
setUpClass
(
cls
):
def
setUpClass
(
cls
):
cls
.
root
=
root
=
tk
.
Tk
()
cls
.
root
=
root
=
tk
.
Tk
()
cls
.
root
.
withdraw
()
pyshell
.
fix_x11_paste
(
root
)
pyshell
.
fix_x11_paste
(
root
)
cls
.
text
=
tk
.
Text
(
root
)
cls
.
text
=
tk
.
Text
(
root
)
cls
.
entry
=
tk
.
Entry
(
root
)
cls
.
entry
=
tk
.
Entry
(
root
)
...
...
Lib/idlelib/idle_test/test_history.py
Dosyayı görüntüle @
5f30f793
...
@@ -68,6 +68,7 @@ class FetchTest(unittest.TestCase):
...
@@ -68,6 +68,7 @@ class FetchTest(unittest.TestCase):
def
setUpClass
(
cls
):
def
setUpClass
(
cls
):
requires
(
'gui'
)
requires
(
'gui'
)
cls
.
root
=
tk
.
Tk
()
cls
.
root
=
tk
.
Tk
()
cls
.
root
.
withdraw
()
def
setUp
(
self
):
def
setUp
(
self
):
self
.
text
=
text
=
TextWrapper
(
self
.
root
)
self
.
text
=
text
=
TextWrapper
(
self
.
root
)
...
...
Lib/idlelib/idle_test/test_hyperparser.py
Dosyayı görüntüle @
5f30f793
...
@@ -37,6 +37,7 @@ class HyperParserTest(unittest.TestCase):
...
@@ -37,6 +37,7 @@ class HyperParserTest(unittest.TestCase):
def
setUpClass
(
cls
):
def
setUpClass
(
cls
):
requires
(
'gui'
)
requires
(
'gui'
)
cls
.
root
=
Tk
()
cls
.
root
=
Tk
()
cls
.
root
.
withdraw
()
cls
.
text
=
Text
(
cls
.
root
)
cls
.
text
=
Text
(
cls
.
root
)
cls
.
editwin
=
DummyEditwin
(
cls
.
text
)
cls
.
editwin
=
DummyEditwin
(
cls
.
text
)
...
...
Lib/idlelib/idle_test/test_macosx.py
Dosyayı görüntüle @
5f30f793
...
@@ -22,6 +22,7 @@ class InitTktypeTest(unittest.TestCase):
...
@@ -22,6 +22,7 @@ class InitTktypeTest(unittest.TestCase):
def
setUpClass
(
cls
):
def
setUpClass
(
cls
):
requires
(
'gui'
)
requires
(
'gui'
)
cls
.
root
=
tk
.
Tk
()
cls
.
root
=
tk
.
Tk
()
cls
.
root
.
withdraw
()
cls
.
orig_platform
=
macosx
.
platform
cls
.
orig_platform
=
macosx
.
platform
@classmethod
@classmethod
...
@@ -76,6 +77,7 @@ class SetupTest(unittest.TestCase):
...
@@ -76,6 +77,7 @@ class SetupTest(unittest.TestCase):
def
setUpClass
(
cls
):
def
setUpClass
(
cls
):
requires
(
'gui'
)
requires
(
'gui'
)
cls
.
root
=
tk
.
Tk
()
cls
.
root
=
tk
.
Tk
()
cls
.
root
.
withdraw
()
@classmethod
@classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
...
...
Lib/idlelib/idle_test/test_query.py
Dosyayı görüntüle @
5f30f793
...
@@ -252,6 +252,7 @@ class QueryGuiTest(unittest.TestCase):
...
@@ -252,6 +252,7 @@ class QueryGuiTest(unittest.TestCase):
def
setUpClass
(
cls
):
def
setUpClass
(
cls
):
requires
(
'gui'
)
requires
(
'gui'
)
cls
.
root
=
root
=
Tk
()
cls
.
root
=
root
=
Tk
()
cls
.
root
.
withdraw
()
cls
.
dialog
=
query
.
Query
(
root
,
'TEST'
,
'test'
,
_utest
=
True
)
cls
.
dialog
=
query
.
Query
(
root
,
'TEST'
,
'test'
,
_utest
=
True
)
cls
.
dialog
.
destroy
=
mock
.
Mock
()
cls
.
dialog
.
destroy
=
mock
.
Mock
()
...
@@ -295,6 +296,7 @@ class SectionnameGuiTest(unittest.TestCase):
...
@@ -295,6 +296,7 @@ class SectionnameGuiTest(unittest.TestCase):
def
test_click_section_name
(
self
):
def
test_click_section_name
(
self
):
root
=
Tk
()
root
=
Tk
()
root
.
withdraw
()
dialog
=
query
.
SectionName
(
root
,
'T'
,
't'
,
{
'abc'
},
_utest
=
True
)
dialog
=
query
.
SectionName
(
root
,
'T'
,
't'
,
{
'abc'
},
_utest
=
True
)
Equal
=
self
.
assertEqual
Equal
=
self
.
assertEqual
self
.
assertEqual
(
dialog
.
used_names
,
{
'abc'
})
self
.
assertEqual
(
dialog
.
used_names
,
{
'abc'
})
...
@@ -314,6 +316,7 @@ class ModulenameGuiTest(unittest.TestCase):
...
@@ -314,6 +316,7 @@ class ModulenameGuiTest(unittest.TestCase):
def
test_click_module_name
(
self
):
def
test_click_module_name
(
self
):
root
=
Tk
()
root
=
Tk
()
root
.
withdraw
()
dialog
=
query
.
ModuleName
(
root
,
'T'
,
't'
,
'idlelib'
,
_utest
=
True
)
dialog
=
query
.
ModuleName
(
root
,
'T'
,
't'
,
'idlelib'
,
_utest
=
True
)
self
.
assertEqual
(
dialog
.
text0
,
'idlelib'
)
self
.
assertEqual
(
dialog
.
text0
,
'idlelib'
)
self
.
assertEqual
(
dialog
.
entry
.
get
(),
'idlelib'
)
self
.
assertEqual
(
dialog
.
entry
.
get
(),
'idlelib'
)
...
@@ -332,6 +335,7 @@ class HelpsourceGuiTest(unittest.TestCase):
...
@@ -332,6 +335,7 @@ class HelpsourceGuiTest(unittest.TestCase):
def
test_click_help_source
(
self
):
def
test_click_help_source
(
self
):
root
=
Tk
()
root
=
Tk
()
root
.
withdraw
()
dialog
=
query
.
HelpSource
(
root
,
'T'
,
menuitem
=
'__test__'
,
dialog
=
query
.
HelpSource
(
root
,
'T'
,
menuitem
=
'__test__'
,
filepath
=
__file__
,
_utest
=
True
)
filepath
=
__file__
,
_utest
=
True
)
Equal
=
self
.
assertEqual
Equal
=
self
.
assertEqual
...
...
Lib/idlelib/idle_test/test_redirector.py
Dosyayı görüntüle @
5f30f793
...
@@ -15,6 +15,7 @@ class InitCloseTest(unittest.TestCase):
...
@@ -15,6 +15,7 @@ class InitCloseTest(unittest.TestCase):
def
setUpClass
(
cls
):
def
setUpClass
(
cls
):
requires
(
'gui'
)
requires
(
'gui'
)
cls
.
root
=
Tk
()
cls
.
root
=
Tk
()
cls
.
root
.
withdraw
()
cls
.
text
=
Text
(
cls
.
root
)
cls
.
text
=
Text
(
cls
.
root
)
@classmethod
@classmethod
...
@@ -44,6 +45,7 @@ class WidgetRedirectorTest(unittest.TestCase):
...
@@ -44,6 +45,7 @@ class WidgetRedirectorTest(unittest.TestCase):
def
setUpClass
(
cls
):
def
setUpClass
(
cls
):
requires
(
'gui'
)
requires
(
'gui'
)
cls
.
root
=
Tk
()
cls
.
root
=
Tk
()
cls
.
root
.
withdraw
()
cls
.
text
=
Text
(
cls
.
root
)
cls
.
text
=
Text
(
cls
.
root
)
@classmethod
@classmethod
...
...
Lib/idlelib/idle_test/test_textview.py
Dosyayı görüntüle @
5f30f793
...
@@ -20,15 +20,16 @@ from idlelib.idle_test.mock_tk import Mbox_func
...
@@ -20,15 +20,16 @@ from idlelib.idle_test.mock_tk import Mbox_func
def
setUpModule
():
def
setUpModule
():
global
root
global
root
root
=
Tk
()
root
=
Tk
()
root
.
withdraw
()
def
tearDownModule
():
def
tearDownModule
():
global
root
global
root
root
.
update_idletasks
()
root
.
update_idletasks
()
root
.
destroy
()
#
pyflakes falsely sees root as undefined
root
.
destroy
()
#
Pyflakes falsely sees root as undefined.
del
root
del
root
class
TV
(
tv
.
TextViewer
):
#
used by TextViewTest
class
TV
(
tv
.
TextViewer
):
#
Used in TextViewTest.
transient
=
Func
()
transient
=
Func
()
grab_set
=
Func
()
grab_set
=
Func
()
wait_window
=
Func
()
wait_window
=
Func
()
...
@@ -59,8 +60,8 @@ class TextViewTest(unittest.TestCase):
...
@@ -59,8 +60,8 @@ class TextViewTest(unittest.TestCase):
view
.
destroy
=
Func
()
view
.
destroy
=
Func
()
view
.
Ok
()
view
.
Ok
()
self
.
assertTrue
(
view
.
destroy
.
called
)
self
.
assertTrue
(
view
.
destroy
.
called
)
del
view
.
destroy
#
unmask real function
del
view
.
destroy
#
Unmask real function.
view
.
destroy
view
.
destroy
()
class
ViewFunctionTest
(
unittest
.
TestCase
):
class
ViewFunctionTest
(
unittest
.
TestCase
):
...
@@ -76,9 +77,10 @@ class ViewFunctionTest(unittest.TestCase):
...
@@ -76,9 +77,10 @@ class ViewFunctionTest(unittest.TestCase):
del
cls
.
orig_error
del
cls
.
orig_error
def
test_view_text
(
self
):
def
test_view_text
(
self
):
# If modal True,
tkinter will error with 'can't invoke "event" command'
# If modal True,
get tk error 'can't invoke "event" command'.
view
=
tv
.
view_text
(
root
,
'Title'
,
'test text'
,
modal
=
False
)
view
=
tv
.
view_text
(
root
,
'Title'
,
'test text'
,
modal
=
False
)
self
.
assertIsInstance
(
view
,
tv
.
TextViewer
)
self
.
assertIsInstance
(
view
,
tv
.
TextViewer
)
view
.
Ok
()
def
test_view_file
(
self
):
def
test_view_file
(
self
):
test_dir
=
os
.
path
.
dirname
(
__file__
)
test_dir
=
os
.
path
.
dirname
(
__file__
)
...
@@ -88,7 +90,7 @@ class ViewFunctionTest(unittest.TestCase):
...
@@ -88,7 +90,7 @@ class ViewFunctionTest(unittest.TestCase):
self
.
assertIn
(
'Test'
,
view
.
textView
.
get
(
'1.0'
,
'1.end'
))
self
.
assertIn
(
'Test'
,
view
.
textView
.
get
(
'1.0'
,
'1.end'
))
view
.
Ok
()
view
.
Ok
()
# Mock showerror will be used
and view_file will return None
# Mock showerror will be used
; view_file will return None.
testfile
=
os
.
path
.
join
(
test_dir
,
'../notthere.py'
)
testfile
=
os
.
path
.
join
(
test_dir
,
'../notthere.py'
)
view
=
tv
.
view_file
(
root
,
'Title'
,
testfile
,
modal
=
False
)
view
=
tv
.
view_file
(
root
,
'Title'
,
testfile
,
modal
=
False
)
self
.
assertIsNone
(
view
)
self
.
assertIsNone
(
view
)
...
...
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