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
d4f5001b
Kaydet (Commit)
d4f5001b
authored
Ock 11, 2017
tarafından
Vinay Sajip
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #29220: Merged fixes from 3.6.
üst
23e5b82c
a861d488
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
__init__.py
Lib/logging/__init__.py
+6
-5
test_logging.py
Lib/test/test_logging.py
+8
-0
No files found.
Lib/logging/__init__.py
Dosyayı görüntüle @
d4f5001b
...
...
@@ -133,11 +133,12 @@ def getLevelName(level):
"""
# See Issues #22386, #27937 and #29220 for why it's this way
result
=
_levelToName
.
get
(
level
)
if
result
is
None
:
result
=
_nameToLevel
.
get
(
level
)
if
result
is
None
:
result
=
"Level
%
s"
%
level
return
result
if
result
is
not
None
:
return
result
result
=
_nameToLevel
.
get
(
level
)
if
result
is
not
None
:
return
result
return
"Level
%
s"
%
level
def
addLevelName
(
level
,
levelName
):
"""
...
...
Lib/test/test_logging.py
Dosyayı görüntüle @
d4f5001b
...
...
@@ -319,6 +319,14 @@ class BuiltinLevelsTest(BaseTest):
fatal
=
logging
.
getLevelName
(
'FATAL'
)
self
.
assertEqual
(
fatal
,
logging
.
FATAL
)
def
test_regression_29220
(
self
):
"""See issue #29220 for more information."""
logging
.
addLevelName
(
logging
.
INFO
,
''
)
self
.
addCleanup
(
logging
.
addLevelName
,
logging
.
INFO
,
'INFO'
)
self
.
assertEqual
(
logging
.
getLevelName
(
logging
.
INFO
),
''
)
self
.
assertEqual
(
logging
.
getLevelName
(
logging
.
NOTSET
),
'NOTSET'
)
self
.
assertEqual
(
logging
.
getLevelName
(
'NOTSET'
),
logging
.
NOTSET
)
class
BasicFilterTest
(
BaseTest
):
"""Test the bundled Filter class."""
...
...
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