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
a8f4e15f
Unverified
Kaydet (Commit)
a8f4e15f
authored
Ara 26, 2017
tarafından
Andrew Svetlov
Kaydeden (comit)
GitHub
Ara 26, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-26133: Fix typos (#5010)
* Fix typos * Change warning text * Add test
üst
e0aef4f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
+19
-2
unix_events.py
Lib/asyncio/unix_events.py
+2
-2
test_unix_events.py
Lib/test/test_asyncio/test_unix_events.py
+17
-0
No files found.
Lib/asyncio/unix_events.py
Dosyayı görüntüle @
a8f4e15f
...
...
@@ -56,9 +56,9 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop):
self
.
remove_signal_handler
(
sig
)
else
:
if
self
.
_signal_handlers
:
war
ini
gs
.
warn
(
f
"Closing the loop {self!r} "
war
nin
gs
.
warn
(
f
"Closing the loop {self!r} "
f
"on interpreter shutdown "
f
"stage, s
ignal unsubsription is disabled
"
,
f
"stage, s
kipping signal handlers removal
"
,
ResourceWarning
,
source
=
self
)
self
.
_signal_handlers
.
clear
()
...
...
Lib/test/test_asyncio/test_unix_events.py
Dosyayı görüntüle @
a8f4e15f
...
...
@@ -229,6 +229,23 @@ class SelectorEventLoopSignalTests(test_utils.TestCase):
self
.
assertEqual
(
len
(
self
.
loop
.
_signal_handlers
),
0
)
m_signal
.
set_wakeup_fd
.
assert_called_once_with
(
-
1
)
@mock.patch
(
'asyncio.unix_events.sys'
)
@mock.patch
(
'asyncio.unix_events.signal'
)
def
test_close_on_finalizing
(
self
,
m_signal
,
m_sys
):
m_signal
.
NSIG
=
signal
.
NSIG
self
.
loop
.
add_signal_handler
(
signal
.
SIGHUP
,
lambda
:
True
)
self
.
assertEqual
(
len
(
self
.
loop
.
_signal_handlers
),
1
)
m_sys
.
is_finalizing
.
return_value
=
True
m_signal
.
signal
.
reset_mock
()
with
self
.
assertWarnsRegex
(
ResourceWarning
,
"skipping signal handlers removal"
):
self
.
loop
.
close
()
self
.
assertEqual
(
len
(
self
.
loop
.
_signal_handlers
),
0
)
self
.
assertFalse
(
m_signal
.
signal
.
called
)
@unittest.skipUnless
(
hasattr
(
socket
,
'AF_UNIX'
),
'UNIX Sockets are not supported'
)
...
...
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