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
5a493e9d
Kaydet (Commit)
5a493e9d
authored
Haz 04, 2016
tarafından
Terry Jan Reedy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge issue #27196 from 3.5: Stop IDLE test 'application destroyed' warnings.
üst
3d7281d2
6047b553
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
10 deletions
+20
-10
README.txt
Lib/idlelib/idle_test/README.txt
+6
-0
test_configdialog.py
Lib/idlelib/idle_test/test_configdialog.py
+3
-3
test_parenmatch.py
Lib/idlelib/idle_test/test_parenmatch.py
+6
-3
test_redirector.py
Lib/idlelib/idle_test/test_redirector.py
+3
-3
test_textview.py
Lib/idlelib/idle_test/test_textview.py
+2
-1
No files found.
Lib/idlelib/idle_test/README.txt
Dosyayı görüntüle @
5a493e9d
...
@@ -71,9 +71,15 @@ deleted BEFORE root is destroyed. See https://bugs.python.org/issue20567.
...
@@ -71,9 +71,15 @@ deleted BEFORE root is destroyed. See https://bugs.python.org/issue20567.
@classmethod
@classmethod
def tearDownClass(cls):
def tearDownClass(cls):
del cls.text
del cls.text
cls.root.update_idletasks()
cls.root.destroy()
cls.root.destroy()
del cls.root
del cls.root
The update_idletasks call is sometimes needed to prevent the following warning
either when running a test alone or as part of the test suite (#27196).
can't invoke "event" command: application has been destroyed
...
"ttk::ThemeChanged"
Requires('gui') causes the test(s) it guards to be skipped if any of
Requires('gui') causes the test(s) it guards to be skipped if any of
these conditions are met:
these conditions are met:
...
...
Lib/idlelib/idle_test/test_configdialog.py
Dosyayı görüntüle @
5a493e9d
'''
Unittests for idlelib/config.py
'''
Test idlelib.configdialog.
Coverage: 46
%
just by creating dialog. The other half is change code.
Coverage: 46
%
just by creating dialog. The other half is change code.
'''
'''
import
unittest
import
unittest
from
test.support
import
requires
from
test.support
import
requires
...
@@ -20,11 +19,12 @@ class ConfigDialogTest(unittest.TestCase):
...
@@ -20,11 +19,12 @@ class ConfigDialogTest(unittest.TestCase):
@classmethod
@classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
cls
.
root
.
update_idletasks
()
cls
.
root
.
destroy
()
cls
.
root
.
destroy
()
del
cls
.
root
del
cls
.
root
def
test_dialog
(
self
):
def
test_dialog
(
self
):
d
=
ConfigDialog
(
self
.
root
,
'Test'
,
_utest
=
True
)
d
=
ConfigDialog
(
self
.
root
,
'Test'
,
_utest
=
True
)
d
.
remove_var_callbacks
()
d
.
remove_var_callbacks
()
d
.
destroy
()
d
.
destroy
()
...
...
Lib/idlelib/idle_test/test_parenmatch.py
Dosyayı görüntüle @
5a493e9d
"""Test idlelib.parenmatch."""
'''Test idlelib.parenmatch.
# This must currently be a gui test because ParenMatch methods use
# several text methods not defined on idlelib.idle_test.mock_tk.Text.
This must currently be a gui test because ParenMatch methods use
several text methods not defined on idlelib.idle_test.mock_tk.Text.
'''
from
test.support
import
requires
from
test.support
import
requires
requires
(
'gui'
)
requires
(
'gui'
)
...
@@ -29,6 +31,7 @@ class ParenMatchTest(unittest.TestCase):
...
@@ -29,6 +31,7 @@ class ParenMatchTest(unittest.TestCase):
@classmethod
@classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
del
cls
.
text
,
cls
.
editwin
del
cls
.
text
,
cls
.
editwin
cls
.
root
.
update_idletasks
()
cls
.
root
.
destroy
()
cls
.
root
.
destroy
()
del
cls
.
root
del
cls
.
root
...
...
Lib/idlelib/idle_test/test_redirector.py
Dosyayı görüntüle @
5a493e9d
"""Unittest for idlelib.redirector
'''Test idlelib.redirector.
100
%
coverage
100
%
coverage
"""
'''
from
test.support
import
requires
from
test.support
import
requires
import
unittest
import
unittest
from
idlelib.idle_test.mock_idle
import
Func
from
idlelib.idle_test.mock_idle
import
Func
...
@@ -48,8 +48,8 @@ class WidgetRedirectorTest(unittest.TestCase):
...
@@ -48,8 +48,8 @@ class WidgetRedirectorTest(unittest.TestCase):
@classmethod
@classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
cls
.
text
.
destroy
()
del
cls
.
text
del
cls
.
text
cls
.
root
.
update_idletasks
()
cls
.
root
.
destroy
()
cls
.
root
.
destroy
()
del
cls
.
root
del
cls
.
root
...
...
Lib/idlelib/idle_test/test_textview.py
Dosyayı görüntüle @
5a493e9d
'''Test
the functions and main class method of textview.py
.
'''Test
idlelib.textview
.
Since all methods and functions create (or destroy) a TextViewer, which
Since all methods and functions create (or destroy) a TextViewer, which
is a widget containing multiple widgets, all tests must be gui tests.
is a widget containing multiple widgets, all tests must be gui tests.
...
@@ -24,6 +24,7 @@ def setUpModule():
...
@@ -24,6 +24,7 @@ def setUpModule():
def
tearDownModule
():
def
tearDownModule
():
global
root
,
TV
global
root
,
TV
del
TV
del
TV
root
.
update_idletasks
()
root
.
destroy
()
# pyflakes falsely sees root as undefined
root
.
destroy
()
# pyflakes falsely sees root as undefined
del
root
del
root
...
...
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