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
027f9a36
Kaydet (Commit)
027f9a36
authored
Eki 02, 2011
tarafından
Charles-François Natali
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #13084: Fix a test_signal failure: the delivery order is only defined for
real-time signals.
üst
6fe679f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
test_signal.py
Lib/test/test_signal.py
+6
-8
No files found.
Lib/test/test_signal.py
Dosyayı görüntüle @
027f9a36
...
...
@@ -224,7 +224,7 @@ class WindowsSignalTests(unittest.TestCase):
@unittest.skipIf
(
sys
.
platform
==
"win32"
,
"Not valid on Windows"
)
class
WakeupSignalTests
(
unittest
.
TestCase
):
def
check_wakeup
(
self
,
test_body
,
*
signals
):
def
check_wakeup
(
self
,
test_body
,
*
signals
,
ordered
=
True
):
# use a subprocess to have only one thread
code
=
"""if 1:
import fcntl
...
...
@@ -240,6 +240,9 @@ class WakeupSignalTests(unittest.TestCase):
def check_signum(signals):
data = os.read(read, len(signals)+1)
raised = struct.unpack('
%
uB'
%
len(data), data)
if not {!r}:
raised = set(raised)
signals = set(signals)
if raised != signals:
raise Exception("
%
r !=
%
r"
%
(raised, signals))
...
...
@@ -258,7 +261,7 @@ class WakeupSignalTests(unittest.TestCase):
os.close(read)
os.close(write)
"""
.
format
(
signals
,
test_body
)
"""
.
format
(
signals
,
ordered
,
test_body
)
assert_python_ok
(
'-c'
,
code
)
...
...
@@ -319,11 +322,6 @@ class WakeupSignalTests(unittest.TestCase):
@unittest.skipUnless
(
hasattr
(
signal
,
'pthread_sigmask'
),
'need signal.pthread_sigmask()'
)
def
test_pending
(
self
):
signals
=
(
signal
.
SIGUSR1
,
signal
.
SIGUSR2
)
# when signals are unblocked, pending signal ared delivered in the
# reverse order of their number
signals
=
tuple
(
sorted
(
signals
,
reverse
=
True
))
self
.
check_wakeup
(
"""def test():
signum1 = signal.SIGUSR1
signum2 = signal.SIGUSR2
...
...
@@ -336,7 +334,7 @@ class WakeupSignalTests(unittest.TestCase):
os.kill(os.getpid(), signum2)
# Unblocking the 2 signals calls the C signal handler twice
signal.pthread_sigmask(signal.SIG_UNBLOCK, (signum1, signum2))
"""
,
*
signals
)
"""
,
signal
.
SIGUSR1
,
signal
.
SIGUSR2
,
ordered
=
False
)
@unittest.skipIf
(
sys
.
platform
==
"win32"
,
"Not valid on Windows"
)
...
...
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