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
8c6521b0
Kaydet (Commit)
8c6521b0
authored
Nis 28, 2013
tarafından
Nadeem Vawda
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #17843: Remove bz2 test data that triggers antivirus warnings.
üst
65960414
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
test_bz2.py
Lib/test/test_bz2.py
+6
-7
testbz2_bigmem.bz2
Lib/test/testbz2_bigmem.bz2
+0
-0
No files found.
Lib/test/test_bz2.py
Dosyayı görüntüle @
8c6521b0
...
@@ -25,9 +25,6 @@ class BaseTest(unittest.TestCase):
...
@@ -25,9 +25,6 @@ class BaseTest(unittest.TestCase):
DATA_CRLF
=
'BZh91AY&SY
\xae
z
\xbb
N
\x00\x01
H
\xdf\x80\x00\x12
@
\x02\xff\xf0\x01\x07
n
\x00
?
\xe7\xff\xe0
@
\x01\xbc\xc6
`
\x86
*
\x8d
=M
\xa9\x9a\x86\xd0
L@
\x0f
I
\xa6
!
\xa1\x13\xc8\x88
jdi
\x8d
@
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0\xb3
(
\xbf\x1d\x83
r
\xe7
M
\xf0
D
\x13
65
\xd8\x88\xd3\xa4\x92\xcb
2
\x06\x04\\\xc1\xb0\xea
//
\xbe
k&
\xd8\xe6
+t
\xe5\xa1\x13\xad
a
\x16\xde
r5"w]
\xa2
i
\xb7
[
\x97
R
\xe2
IT
\xcd
;Z
\x04
dk4
\xad\x8a\t\xd3\x81
z
\x10\xf1
:^`
\xab\x1f\xc5\xdc\x91
N
\x14
$+
\x9e\xae\xd3\x80
'
EMPTY_DATA
=
'BZh9
\x17
rE8P
\x90\x00\x00\x00\x00
'
EMPTY_DATA
=
'BZh9
\x17
rE8P
\x90\x00\x00\x00\x00
'
with
open
(
findfile
(
"testbz2_bigmem.bz2"
),
"rb"
)
as
f
:
DATA_BIGMEM
=
f
.
read
()
if
has_cmdline_bunzip2
:
if
has_cmdline_bunzip2
:
def
decompress
(
self
,
data
):
def
decompress
(
self
,
data
):
pop
=
subprocess
.
Popen
(
"bunzip2"
,
shell
=
True
,
pop
=
subprocess
.
Popen
(
"bunzip2"
,
shell
=
True
,
...
@@ -431,9 +428,10 @@ class BZ2DecompressorTest(BaseTest):
...
@@ -431,9 +428,10 @@ class BZ2DecompressorTest(BaseTest):
# Issue #14398: decompression fails when output data is >=2GB.
# Issue #14398: decompression fails when output data is >=2GB.
if
size
<
_4G
:
if
size
<
_4G
:
self
.
skipTest
(
"Test needs 5GB of memory to run."
)
self
.
skipTest
(
"Test needs 5GB of memory to run."
)
text
=
bz2
.
BZ2Decompressor
()
.
decompress
(
self
.
DATA_BIGMEM
)
compressed
=
bz2
.
compress
(
"a"
*
_4G
)
text
=
bz2
.
BZ2Decompressor
()
.
decompress
(
compressed
)
self
.
assertEqual
(
len
(
text
),
_4G
)
self
.
assertEqual
(
len
(
text
),
_4G
)
self
.
assertEqual
(
text
.
strip
(
"
\0
"
),
""
)
self
.
assertEqual
(
text
.
strip
(
"
a
"
),
""
)
class
FuncTest
(
BaseTest
):
class
FuncTest
(
BaseTest
):
...
@@ -482,9 +480,10 @@ class FuncTest(BaseTest):
...
@@ -482,9 +480,10 @@ class FuncTest(BaseTest):
# Issue #14398: decompression fails when output data is >=2GB.
# Issue #14398: decompression fails when output data is >=2GB.
if
size
<
_4G
:
if
size
<
_4G
:
self
.
skipTest
(
"Test needs 5GB of memory to run."
)
self
.
skipTest
(
"Test needs 5GB of memory to run."
)
text
=
bz2
.
decompress
(
self
.
DATA_BIGMEM
)
compressed
=
bz2
.
compress
(
"a"
*
_4G
)
text
=
bz2
.
decompress
(
compressed
)
self
.
assertEqual
(
len
(
text
),
_4G
)
self
.
assertEqual
(
len
(
text
),
_4G
)
self
.
assertEqual
(
text
.
strip
(
"
\0
"
),
""
)
self
.
assertEqual
(
text
.
strip
(
"
a
"
),
""
)
def
test_main
():
def
test_main
():
test_support
.
run_unittest
(
test_support
.
run_unittest
(
...
...
Lib/test/testbz2_bigmem.bz2
deleted
100644 → 0
Dosyayı görüntüle @
65960414
File deleted
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