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
b241c421
Kaydet (Commit)
b241c421
authored
Ock 13, 1997
tarafından
Barry Warsaw
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
A slightly better test of sunaudiodev module. Include the audio data
in the distribution.
üst
dbfb8d46
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
22 deletions
+9
-22
audiotest.au
Lib/test/audiotest.au
+0
-0
test_sunaudiodev.py
Lib/test/test_sunaudiodev.py
+9
-22
No files found.
Lib/test/audiotest.au
0 → 100644
Dosyayı görüntüle @
b241c421
This diff was suppressed by a .gitattributes entry.
Lib/test/test_sunaudiodev.py
Dosyayı görüntüle @
b241c421
...
@@ -2,10 +2,13 @@ from test_support import verbose, TestFailed
...
@@ -2,10 +2,13 @@ from test_support import verbose, TestFailed
import
sunaudiodev
import
sunaudiodev
import
os
import
os
OS_AUDIO_DIRS
=
[
def
findfile
(
file
):
'/usr/demo/SOUND/sounds/'
,
# Solaris 2.x
if
os
.
path
.
isabs
(
file
):
return
file
]
import
sys
for
dn
in
sys
.
path
:
fn
=
os
.
path
.
join
(
dn
,
file
)
if
os
.
path
.
exists
(
fn
):
return
fn
return
file
def
play_sound_file
(
path
):
def
play_sound_file
(
path
):
fp
=
open
(
path
,
'r'
)
fp
=
open
(
path
,
'r'
)
...
@@ -16,23 +19,7 @@ def play_sound_file(path):
...
@@ -16,23 +19,7 @@ def play_sound_file(path):
a
.
close
()
a
.
close
()
def
test
():
def
test
():
for
d
in
OS_AUDIO_DIRS
:
print
os
.
getcwd
()
try
:
play_sound_file
(
findfile
(
'audiotest.au'
))
files
=
os
.
listdir
(
d
)
break
except
os
.
error
:
pass
else
:
# test couldn't be conducted on this platform
raise
ImportError
for
f
in
files
:
path
=
os
.
path
.
join
(
d
,
f
)
try
:
play_sound_file
(
path
)
break
except
:
pass
else
:
raise
TestFailed
,
"couldn't play any sounds"
test
()
test
()
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