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
7836a27c
Kaydet (Commit)
7836a27c
authored
Eki 09, 2015
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #25298: Add lock and rlock weakref tests (Contributed by Nir Soffer).
üst
b3653a34
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
lock_tests.py
Lib/test/lock_tests.py
+12
-0
No files found.
Lib/test/lock_tests.py
Dosyayı görüntüle @
7836a27c
...
@@ -7,6 +7,7 @@ import time
...
@@ -7,6 +7,7 @@ import time
from
_thread
import
start_new_thread
,
TIMEOUT_MAX
from
_thread
import
start_new_thread
,
TIMEOUT_MAX
import
threading
import
threading
import
unittest
import
unittest
import
weakref
from
test
import
support
from
test
import
support
...
@@ -198,6 +199,17 @@ class BaseLockTests(BaseTestCase):
...
@@ -198,6 +199,17 @@ class BaseLockTests(BaseTestCase):
self
.
assertFalse
(
results
[
0
])
self
.
assertFalse
(
results
[
0
])
self
.
assertTimeout
(
results
[
1
],
0.5
)
self
.
assertTimeout
(
results
[
1
],
0.5
)
def
test_weakref_exists
(
self
):
lock
=
self
.
locktype
()
ref
=
weakref
.
ref
(
lock
)
self
.
assertIsNotNone
(
ref
())
def
test_weakref_deleted
(
self
):
lock
=
self
.
locktype
()
ref
=
weakref
.
ref
(
lock
)
del
lock
self
.
assertIsNone
(
ref
())
class
LockTests
(
BaseLockTests
):
class
LockTests
(
BaseLockTests
):
"""
"""
...
...
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