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
b47553a1
Kaydet (Commit)
b47553a1
authored
May 09, 2011
tarafından
Ezio Melotti
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Some more tests were incorrectly marked as C specific.
üst
591c2dfa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
test_heapq.py
Lib/test/test_heapq.py
+14
-13
No files found.
Lib/test/test_heapq.py
Dosyayı görüntüle @
b47553a1
...
@@ -190,17 +190,8 @@ class TestHeap(TestCase):
...
@@ -190,17 +190,8 @@ class TestHeap(TestCase):
self
.
assertEqual
(
self
.
module
.
nlargest
(
n
,
data
,
key
=
f
),
self
.
assertEqual
(
self
.
module
.
nlargest
(
n
,
data
,
key
=
f
),
sorted
(
data
,
key
=
f
,
reverse
=
True
)[:
n
])
sorted
(
data
,
key
=
f
,
reverse
=
True
)[:
n
])
class
TestHeapPython
(
TestHeap
):
module
=
py_heapq
@skipUnless
(
c_heapq
,
'requires _heapq'
)
class
TestHeapC
(
TestHeap
):
module
=
c_heapq
def
test_comparison_operator
(
self
):
def
test_comparison_operator
(
self
):
# Issue 3
50
1: Make sure heapq works with both __lt__ and __le__
# Issue 3
05
1: Make sure heapq works with both __lt__ and __le__
def
hsort
(
data
,
comp
):
def
hsort
(
data
,
comp
):
data
=
map
(
comp
,
data
)
data
=
map
(
comp
,
data
)
self
.
module
.
heapify
(
data
)
self
.
module
.
heapify
(
data
)
...
@@ -221,6 +212,15 @@ class TestHeapC(TestHeap):
...
@@ -221,6 +212,15 @@ class TestHeapC(TestHeap):
self
.
assertEqual
(
hsort
(
data
,
LE
),
target
)
self
.
assertEqual
(
hsort
(
data
,
LE
),
target
)
class
TestHeapPython
(
TestHeap
):
module
=
py_heapq
@skipUnless
(
c_heapq
,
'requires _heapq'
)
class
TestHeapC
(
TestHeap
):
module
=
c_heapq
#==============================================================================
#==============================================================================
class
LenOnly
:
class
LenOnly
:
...
@@ -316,6 +316,7 @@ def L(seqn):
...
@@ -316,6 +316,7 @@ def L(seqn):
return
chain
(
imap
(
lambda
x
:
x
,
R
(
Ig
(
G
(
seqn
)))))
return
chain
(
imap
(
lambda
x
:
x
,
R
(
Ig
(
G
(
seqn
)))))
class
TestErrorHandling
(
TestCase
):
class
TestErrorHandling
(
TestCase
):
module
=
None
def
test_non_sequence
(
self
):
def
test_non_sequence
(
self
):
for
f
in
(
self
.
module
.
heapify
,
self
.
module
.
heappop
):
for
f
in
(
self
.
module
.
heapify
,
self
.
module
.
heappop
):
...
@@ -361,12 +362,12 @@ class TestErrorHandling(TestCase):
...
@@ -361,12 +362,12 @@ class TestErrorHandling(TestCase):
self
.
assertRaises
(
ZeroDivisionError
,
f
,
2
,
E
(
s
))
self
.
assertRaises
(
ZeroDivisionError
,
f
,
2
,
E
(
s
))
class
TestErrorHandling
_
Python
(
TestErrorHandling
):
class
TestErrorHandlingPython
(
TestErrorHandling
):
module
=
py_heapq
module
=
py_heapq
@skipUnless
(
c_heapq
,
'requires _heapq'
)
@skipUnless
(
c_heapq
,
'requires _heapq'
)
class
TestErrorHandling
_
C
(
TestErrorHandling
):
class
TestErrorHandlingC
(
TestErrorHandling
):
module
=
c_heapq
module
=
c_heapq
...
@@ -375,7 +376,7 @@ class TestErrorHandling_C(TestErrorHandling):
...
@@ -375,7 +376,7 @@ class TestErrorHandling_C(TestErrorHandling):
def
test_main
(
verbose
=
None
):
def
test_main
(
verbose
=
None
):
test_classes
=
[
TestModules
,
TestHeapPython
,
TestHeapC
,
test_classes
=
[
TestModules
,
TestHeapPython
,
TestHeapC
,
TestErrorHandling
_Python
,
TestErrorHandling_
C
]
TestErrorHandling
Python
,
TestErrorHandling
C
]
test_support
.
run_unittest
(
*
test_classes
)
test_support
.
run_unittest
(
*
test_classes
)
# verify reference counting
# verify reference counting
...
...
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