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
7a5691f0
Kaydet (Commit)
7a5691f0
authored
Haz 22, 2016
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge 2.7.12 release branch
üst
b3eaaf0b
95d95552
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
1 deletion
+67
-1
aboutDialog.py
Lib/idlelib/aboutDialog.py
+3
-1
test_helpabout.py
Lib/idlelib/idle_test/test_helpabout.py
+52
-0
textView.py
Lib/idlelib/textView.py
+4
-0
NEWS
Misc/NEWS
+8
-0
No files found.
Lib/idlelib/aboutDialog.py
Dosyayı görüntüle @
7a5691f0
...
@@ -129,7 +129,7 @@ class AboutDialog(Toplevel):
...
@@ -129,7 +129,7 @@ class AboutDialog(Toplevel):
self
.
display_file_text
(
'About - Readme'
,
'README.txt'
,
'ascii'
)
self
.
display_file_text
(
'About - Readme'
,
'README.txt'
,
'ascii'
)
def
ShowIDLENEWS
(
self
):
def
ShowIDLENEWS
(
self
):
self
.
display_file_text
(
'About - NEWS'
,
'NEWS.txt'
,
'
ascii
'
)
self
.
display_file_text
(
'About - NEWS'
,
'NEWS.txt'
,
'
utf-8
'
)
def
display_printer_text
(
self
,
title
,
printer
):
def
display_printer_text
(
self
,
title
,
printer
):
printer
.
_Printer__setup
()
printer
.
_Printer__setup
()
...
@@ -144,5 +144,7 @@ class AboutDialog(Toplevel):
...
@@ -144,5 +144,7 @@ class AboutDialog(Toplevel):
self
.
destroy
()
self
.
destroy
()
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
import
unittest
unittest
.
main
(
'idlelib.idle_test.test_helpabout'
,
verbosity
=
2
,
exit
=
False
)
from
idlelib.idle_test.htest
import
run
from
idlelib.idle_test.htest
import
run
run
(
AboutDialog
)
run
(
AboutDialog
)
Lib/idlelib/idle_test/test_helpabout.py
0 → 100644
Dosyayı görüntüle @
7a5691f0
'''Test idlelib.help_about.
Coverage:
'''
from
idlelib
import
aboutDialog
as
help_about
from
idlelib
import
textView
as
textview
from
idlelib.idle_test.mock_idle
import
Func
from
idlelib.idle_test.mock_tk
import
Mbox
import
unittest
About
=
help_about
.
AboutDialog
class
Dummy_about_dialog
():
# Dummy class for testing file display functions.
idle_credits
=
About
.
ShowIDLECredits
.
im_func
idle_readme
=
About
.
ShowIDLEAbout
.
im_func
idle_news
=
About
.
ShowIDLENEWS
.
im_func
# Called by the above
display_file_text
=
About
.
display_file_text
.
im_func
class
DisplayFileTest
(
unittest
.
TestCase
):
"Test that .txt files are found and properly decoded."
dialog
=
Dummy_about_dialog
()
@classmethod
def
setUpClass
(
cls
):
cls
.
orig_mbox
=
textview
.
tkMessageBox
cls
.
orig_view
=
textview
.
view_text
cls
.
mbox
=
Mbox
()
cls
.
view
=
Func
()
textview
.
tkMessageBox
=
cls
.
mbox
textview
.
view_text
=
cls
.
view
cls
.
About
=
Dummy_about_dialog
()
@classmethod
def
tearDownClass
(
cls
):
textview
.
tkMessageBox
=
cls
.
orig_mbox
textview
.
view_text
=
cls
.
orig_view
.
im_func
def
test_file_isplay
(
self
):
for
handler
in
(
self
.
dialog
.
idle_credits
,
self
.
dialog
.
idle_readme
,
self
.
dialog
.
idle_news
):
self
.
mbox
.
showerror
.
message
=
''
self
.
view
.
called
=
False
handler
()
self
.
assertEqual
(
self
.
mbox
.
showerror
.
message
,
''
)
self
.
assertEqual
(
self
.
view
.
called
,
True
)
if
__name__
==
'__main__'
:
unittest
.
main
(
verbosity
=
2
)
Lib/idlelib/textView.py
Dosyayı görüntüle @
7a5691f0
...
@@ -79,6 +79,10 @@ def view_file(parent, title, filename, encoding=None, modal=True):
...
@@ -79,6 +79,10 @@ def view_file(parent, title, filename, encoding=None, modal=True):
tkMessageBox
.
showerror
(
title
=
'File Load Error'
,
tkMessageBox
.
showerror
(
title
=
'File Load Error'
,
message
=
'Unable to load file
%
r .'
%
filename
,
message
=
'Unable to load file
%
r .'
%
filename
,
parent
=
parent
)
parent
=
parent
)
except
UnicodeDecodeError
as
err
:
showerror
(
title
=
'Unicode Decode Error'
,
message
=
str
(
err
),
parent
=
parent
)
else
:
else
:
return
view_text
(
parent
,
title
,
textFile
.
read
(),
modal
)
return
view_text
(
parent
,
title
,
textFile
.
read
(),
modal
)
...
...
Misc/NEWS
Dosyayı görüntüle @
7a5691f0
...
@@ -35,11 +35,19 @@ Documentation
...
@@ -35,11 +35,19 @@ Documentation
resulting
links
to
use
lowercase
.
Patch
by
Sean
Rodman
,
test
by
Kaushik
resulting
links
to
use
lowercase
.
Patch
by
Sean
Rodman
,
test
by
Kaushik
Nadikuditi
.
Nadikuditi
.
What
's New in Python 2.7.12?
============================
Build
Build
-----
-----
- Issue #26930: Update Windows builds to use OpenSSL 1.0.2h.
- Issue #26930: Update Windows builds to use OpenSSL 1.0.2h.
IDLE
----
- Issue #27365: Fix about dialog.
What'
s
New
in
Python
2.7.12
release
candidate
1
?
What'
s
New
in
Python
2.7.12
release
candidate
1
?
================================================
================================================
...
...
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