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
e723e961
Kaydet (Commit)
e723e961
authored
Nis 15, 2011
tarafından
Vinay Sajip
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #11852: Add missing imports and update tests.
üst
6c9e5b77
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
handlers.py
Lib/logging/handlers.py
+2
-0
test_logging.py
Lib/test/test_logging.py
+16
-0
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/logging/handlers.py
Dosyayı görüntüle @
e723e961
...
@@ -26,6 +26,8 @@ To use, simply 'import logging.handlers' and log away!
...
@@ -26,6 +26,8 @@ To use, simply 'import logging.handlers' and log away!
import
logging
,
socket
,
os
,
pickle
,
struct
,
time
,
re
import
logging
,
socket
,
os
,
pickle
,
struct
,
time
,
re
from
stat
import
ST_DEV
,
ST_INO
,
ST_MTIME
from
stat
import
ST_DEV
,
ST_INO
,
ST_MTIME
import
queue
import
threading
try
:
try
:
import
codecs
import
codecs
...
...
Lib/test/test_logging.py
Dosyayı görüntüle @
e723e961
...
@@ -41,6 +41,7 @@ import struct
...
@@ -41,6 +41,7 @@ import struct
import
sys
import
sys
import
tempfile
import
tempfile
from
test.support
import
captured_stdout
,
run_with_locale
,
run_unittest
from
test.support
import
captured_stdout
,
run_with_locale
,
run_unittest
from
test.support
import
TestHandler
,
Matcher
import
textwrap
import
textwrap
import
unittest
import
unittest
import
warnings
import
warnings
...
@@ -2092,6 +2093,21 @@ class QueueHandlerTest(BaseTest):
...
@@ -2092,6 +2093,21 @@ class QueueHandlerTest(BaseTest):
self
.
assertEqual
(
data
.
name
,
self
.
que_logger
.
name
)
self
.
assertEqual
(
data
.
name
,
self
.
que_logger
.
name
)
self
.
assertEqual
((
data
.
msg
,
data
.
args
),
(
msg
,
None
))
self
.
assertEqual
((
data
.
msg
,
data
.
args
),
(
msg
,
None
))
def
test_queue_listener
(
self
):
handler
=
TestHandler
(
Matcher
())
listener
=
logging
.
handlers
.
QueueListener
(
self
.
queue
,
handler
)
listener
.
start
()
try
:
self
.
que_logger
.
warning
(
self
.
next_message
())
self
.
que_logger
.
error
(
self
.
next_message
())
self
.
que_logger
.
critical
(
self
.
next_message
())
finally
:
listener
.
stop
()
self
.
assertTrue
(
handler
.
matches
(
levelno
=
logging
.
WARNING
,
message
=
'1'
))
self
.
assertTrue
(
handler
.
matches
(
levelno
=
logging
.
ERROR
,
message
=
'2'
))
self
.
assertTrue
(
handler
.
matches
(
levelno
=
logging
.
CRITICAL
,
message
=
'3'
))
class
FormatterTest
(
unittest
.
TestCase
):
class
FormatterTest
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
self
.
common
=
{
self
.
common
=
{
...
...
Misc/NEWS
Dosyayı görüntüle @
e723e961
...
@@ -60,6 +60,8 @@ Core and Builtins
...
@@ -60,6 +60,8 @@ Core and Builtins
Library
Library
-------
-------
-
Issue
#
11852
:
Add
missing
imports
and
update
tests
.
-
Issue
#
11467
:
Fix
urlparse
behavior
when
handling
urls
which
contains
scheme
-
Issue
#
11467
:
Fix
urlparse
behavior
when
handling
urls
which
contains
scheme
specific
part
only
digits
.
Patch
by
Santoso
Wijaya
.
specific
part
only
digits
.
Patch
by
Santoso
Wijaya
.
...
...
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