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
ec560194
Kaydet (Commit)
ec560194
authored
Eki 15, 2007
tarafından
Armin Rigo
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
test_bigbits was not testing what it seemed to.
üst
d29f1d22
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
test_zlib.py
Lib/test/test_zlib.py
+8
-4
No files found.
Lib/test/test_zlib.py
Dosyayı görüntüle @
ec560194
...
@@ -42,14 +42,18 @@ class ChecksumTestCase(unittest.TestCase):
...
@@ -42,14 +42,18 @@ class ChecksumTestCase(unittest.TestCase):
class
ExceptionTestCase
(
unittest
.
TestCase
):
class
ExceptionTestCase
(
unittest
.
TestCase
):
# make sure we generate some expected errors
# make sure we generate some expected errors
def
test_bigbits
(
self
):
def
test_badlevel
(
self
):
# specifying total bits too large causes an error
# specifying compression level out of range causes an error
self
.
assertRaises
(
zlib
.
error
,
# (but -1 is Z_DEFAULT_COMPRESSION and apparently the zlib
zlib
.
compress
,
'ERROR'
,
zlib
.
MAX_WBITS
+
1
)
# accepts 0 too)
self
.
assertRaises
(
zlib
.
error
,
zlib
.
compress
,
'ERROR'
,
10
)
def
test_badcompressobj
(
self
):
def
test_badcompressobj
(
self
):
# verify failure on building compress object with bad params
# verify failure on building compress object with bad params
self
.
assertRaises
(
ValueError
,
zlib
.
compressobj
,
1
,
zlib
.
DEFLATED
,
0
)
self
.
assertRaises
(
ValueError
,
zlib
.
compressobj
,
1
,
zlib
.
DEFLATED
,
0
)
# specifying total bits too large causes an error
self
.
assertRaises
(
ValueError
,
zlib
.
compressobj
,
1
,
zlib
.
DEFLATED
,
zlib
.
MAX_WBITS
+
1
)
def
test_baddecompressobj
(
self
):
def
test_baddecompressobj
(
self
):
# verify failure on building decompress object with bad params
# verify failure on building decompress object with bad params
...
...
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