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
8ff37371
Kaydet (Commit)
8ff37371
authored
Haz 02, 2014
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
(Merge 3.4) Issue #21636: Fix test_logging, skip UNIX stream (AF_UNIX) tests on
Windows. Patch written by Claudiu Popa.
üst
f849f464
ec5a860e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
test_logging.py
Lib/test/test_logging.py
+12
-10
No files found.
Lib/test/test_logging.py
Dosyayı görüntüle @
8ff37371
...
...
@@ -860,9 +860,6 @@ if threading:
super
(
TestTCPServer
,
self
)
.
server_bind
()
self
.
port
=
self
.
socket
.
getsockname
()[
1
]
class
TestUnixStreamServer
(
TestTCPServer
):
address_family
=
socket
.
AF_UNIX
class
TestUDPServer
(
ControlMixin
,
ThreadingUDPServer
):
"""
A UDP server which is controllable using :class:`ControlMixin`.
...
...
@@ -910,8 +907,12 @@ if threading:
super
(
TestUDPServer
,
self
)
.
server_close
()
self
.
_closed
=
True
class
TestUnixDatagramServer
(
TestUDPServer
):
address_family
=
socket
.
AF_UNIX
if
hasattr
(
socket
,
"AF_UNIX"
):
class
TestUnixStreamServer
(
TestTCPServer
):
address_family
=
socket
.
AF_UNIX
class
TestUnixDatagramServer
(
TestUDPServer
):
address_family
=
socket
.
AF_UNIX
# - end of server_helper section
...
...
@@ -1452,12 +1453,13 @@ def _get_temp_domain_socket():
os
.
remove
(
fn
)
return
fn
@unittest.skipUnless
(
hasattr
(
socket
,
"AF_UNIX"
),
"Unix sockets required"
)
@unittest.skipUnless
(
threading
,
'Threading required for this test.'
)
class
UnixSocketHandlerTest
(
SocketHandlerTest
):
"""Test for SocketHandler with unix sockets."""
if
threading
:
if
threading
and
hasattr
(
socket
,
"AF_UNIX"
)
:
server_class
=
TestUnixStreamServer
def
setUp
(
self
):
...
...
@@ -1523,13 +1525,13 @@ class DatagramHandlerTest(BaseTest):
self
.
handled
.
wait
()
self
.
assertEqual
(
self
.
log_output
,
"spam
\n
eggs
\n
"
)
@unittest.skipUnless
(
hasattr
(
socket
,
"AF_UNIX"
),
"Unix sockets required"
)
@unittest.skipUnless
(
threading
,
'Threading required for this test.'
)
class
UnixDatagramHandlerTest
(
DatagramHandlerTest
):
"""Test for DatagramHandler using Unix sockets."""
if
threading
:
if
threading
and
hasattr
(
socket
,
"AF_UNIX"
)
:
server_class
=
TestUnixDatagramServer
def
setUp
(
self
):
...
...
@@ -1598,13 +1600,13 @@ class SysLogHandlerTest(BaseTest):
self
.
handled
.
wait
()
self
.
assertEqual
(
self
.
log_output
,
b
'<11>h
\xc3\xa4
m-sp
\xc3\xa4
m'
)
@unittest.skipUnless
(
hasattr
(
socket
,
"AF_UNIX"
),
"Unix sockets required"
)
@unittest.skipUnless
(
threading
,
'Threading required for this test.'
)
class
UnixSysLogHandlerTest
(
SysLogHandlerTest
):
"""Test for SysLogHandler with Unix sockets."""
if
threading
:
if
threading
and
hasattr
(
socket
,
"AF_UNIX"
)
:
server_class
=
TestUnixDatagramServer
def
setUp
(
self
):
...
...
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