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
52ee2471
Kaydet (Commit)
52ee2471
authored
Eyl 09, 2015
tarafından
Terry Jan Reedy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge with 3.4
üst
6a563b68
78d915aa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
+19
-2
test_warning.py
Lib/idlelib/idle_test/test_warning.py
+9
-0
idlever.py
Lib/idlelib/idlever.py
+10
-2
No files found.
Lib/idlelib/idle_test/test_warning.py
Dosyayı görüntüle @
52ee2471
...
...
@@ -68,6 +68,15 @@ class ShellWarnTest(unittest.TestCase):
'Test'
,
UserWarning
,
'test_warning.py'
,
99
,
f
,
'Line of code'
)
self
.
assertEqual
(
shellmsg
.
splitlines
(),
f
.
getvalue
()
.
splitlines
())
class
ImportWarnTest
(
unittest
.
TestCase
):
def
test_idlever
(
self
):
with
warnings
.
catch_warnings
(
record
=
True
)
as
w
:
warnings
.
simplefilter
(
"always"
)
import
idlelib.idlever
self
.
assertEqual
(
len
(
w
),
1
)
self
.
assertTrue
(
issubclass
(
w
[
-
1
]
.
category
,
DeprecationWarning
))
self
.
assertIn
(
"version"
,
str
(
w
[
-
1
]
.
message
))
if
__name__
==
'__main__'
:
unittest
.
main
(
verbosity
=
2
,
exit
=
False
)
Lib/idlelib/idlever.py
Dosyayı görüntüle @
52ee2471
"""Unused by Idle: there is no separate Idle version anymore.
Kept only for possible existing extension use."""
"""
The separate Idle version was eliminated years ago;
idlelib.idlever is no longer used by Idle
and will be removed in 3.6 or later. Use
from sys import version
IDLE_VERSION = version[:version.index(' ')]
"""
# Kept for now only for possible existing extension use
import
warnings
as
w
w
.
warn
(
__doc__
,
DeprecationWarning
)
from
sys
import
version
IDLE_VERSION
=
version
[:
version
.
index
(
' '
)]
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