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
7c6b3ea4
Kaydet (Commit)
7c6b3ea4
authored
Haz 28, 2016
tarafından
Yury Selivanov
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge 3.5 (asyncio)
üst
7de28405
77bc04a3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
sslproto.py
Lib/asyncio/sslproto.py
+1
-0
test_sslproto.py
Lib/test/test_asyncio/test_sslproto.py
+16
-0
No files found.
Lib/asyncio/sslproto.py
Dosyayı görüntüle @
7c6b3ea4
...
@@ -5,6 +5,7 @@ try:
...
@@ -5,6 +5,7 @@ try:
except
ImportError
:
# pragma: no cover
except
ImportError
:
# pragma: no cover
ssl
=
None
ssl
=
None
from
.
import
base_events
from
.
import
compat
from
.
import
compat
from
.
import
protocols
from
.
import
protocols
from
.
import
transports
from
.
import
transports
...
...
Lib/test/test_asyncio/test_sslproto.py
Dosyayı görüntüle @
7c6b3ea4
"""Tests for asyncio/sslproto.py."""
"""Tests for asyncio/sslproto.py."""
import
logging
import
unittest
import
unittest
from
unittest
import
mock
from
unittest
import
mock
try
:
try
:
...
@@ -8,6 +9,7 @@ except ImportError:
...
@@ -8,6 +9,7 @@ except ImportError:
ssl
=
None
ssl
=
None
import
asyncio
import
asyncio
from
asyncio
import
log
from
asyncio
import
sslproto
from
asyncio
import
sslproto
from
asyncio
import
test_utils
from
asyncio
import
test_utils
...
@@ -66,6 +68,20 @@ class SslProtoHandshakeTests(test_utils.TestCase):
...
@@ -66,6 +68,20 @@ class SslProtoHandshakeTests(test_utils.TestCase):
test_utils
.
run_briefly
(
self
.
loop
)
test_utils
.
run_briefly
(
self
.
loop
)
self
.
assertIsInstance
(
waiter
.
exception
(),
ConnectionResetError
)
self
.
assertIsInstance
(
waiter
.
exception
(),
ConnectionResetError
)
def
test_fatal_error_no_name_error
(
self
):
# From issue #363.
# _fatal_error() generates a NameError if sslproto.py
# does not import base_events.
waiter
=
asyncio
.
Future
(
loop
=
self
.
loop
)
ssl_proto
=
self
.
ssl_protocol
(
waiter
)
# Temporarily turn off error logging so as not to spoil test output.
log_level
=
log
.
logger
.
getEffectiveLevel
()
log
.
logger
.
setLevel
(
logging
.
FATAL
)
try
:
ssl_proto
.
_fatal_error
(
None
)
finally
:
# Restore error logging.
log
.
logger
.
setLevel
(
log_level
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
unittest
.
main
()
unittest
.
main
()
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