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
c72105c0
Kaydet (Commit)
c72105c0
authored
Eki 14, 2013
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #18919: Catch and check warnings in the aifc module tests.
üst
62e95802
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
test_aifc.py
Lib/test/test_aifc.py
+12
-4
No files found.
Lib/test/test_aifc.py
Dosyayı görüntüle @
c72105c0
from
test.test_support
import
findfile
,
TESTFN
,
unlink
,
run_unittest
from
test.test_support
import
(
findfile
,
TESTFN
,
unlink
,
captured_stdout
,
run_unittest
)
import
unittest
from
test
import
audiotests
import
os
...
...
@@ -225,7 +226,10 @@ class AIFCLowLevelTest(unittest.TestCase):
b
+=
'COMM'
+
struct
.
pack
(
'>LhlhhLL'
,
18
,
0
,
0
,
0
,
0
,
0
,
0
)
b
+=
'SSND'
+
struct
.
pack
(
'>L'
,
8
)
+
'
\x00
'
*
8
b
+=
'MARK'
+
struct
.
pack
(
'>LhB'
,
3
,
1
,
1
)
f
=
aifc
.
open
(
io
.
BytesIO
(
b
))
with
captured_stdout
()
as
s
:
f
=
aifc
.
open
(
io
.
BytesIO
(
b
))
self
.
assertEqual
(
s
.
getvalue
(),
'Warning: MARK chunk contains '
'only 0 markers instead of 1
\n
'
)
self
.
assertEqual
(
f
.
getmarkers
(),
None
)
def
test_read_comm_kludge_compname_even
(
self
):
...
...
@@ -233,7 +237,9 @@ class AIFCLowLevelTest(unittest.TestCase):
b
+=
'COMM'
+
struct
.
pack
(
'>LhlhhLL'
,
18
,
0
,
0
,
0
,
0
,
0
,
0
)
b
+=
'NONE'
+
struct
.
pack
(
'B'
,
4
)
+
'even'
+
'
\x00
'
b
+=
'SSND'
+
struct
.
pack
(
'>L'
,
8
)
+
'
\x00
'
*
8
f
=
aifc
.
open
(
io
.
BytesIO
(
b
))
with
captured_stdout
()
as
s
:
f
=
aifc
.
open
(
io
.
BytesIO
(
b
))
self
.
assertEqual
(
s
.
getvalue
(),
'Warning: bad COMM chunk size
\n
'
)
self
.
assertEqual
(
f
.
getcompname
(),
'even'
)
def
test_read_comm_kludge_compname_odd
(
self
):
...
...
@@ -241,7 +247,9 @@ class AIFCLowLevelTest(unittest.TestCase):
b
+=
'COMM'
+
struct
.
pack
(
'>LhlhhLL'
,
18
,
0
,
0
,
0
,
0
,
0
,
0
)
b
+=
'NONE'
+
struct
.
pack
(
'B'
,
3
)
+
'odd'
b
+=
'SSND'
+
struct
.
pack
(
'>L'
,
8
)
+
'
\x00
'
*
8
f
=
aifc
.
open
(
io
.
BytesIO
(
b
))
with
captured_stdout
()
as
s
:
f
=
aifc
.
open
(
io
.
BytesIO
(
b
))
self
.
assertEqual
(
s
.
getvalue
(),
'Warning: bad COMM chunk size
\n
'
)
self
.
assertEqual
(
f
.
getcompname
(),
'odd'
)
def
test_write_params_raises
(
self
):
...
...
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