summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2002-12-30 17:45:02 +0000
committerBarry Warsaw <barry@python.org>2002-12-30 17:45:02 +0000
commitf29ffbdbf5a70f5230ce130372055924f71277a6 (patch)
treeba2c17722001f729284e97689efcd74769622cc9
parentc99c08c764df60650b371914e9c1f0fe1920fd63 (diff)
downloadcpython-git-f29ffbdbf5a70f5230ce130372055924f71277a6.tar.gz
TestMIMEAudio.setUp(): Use the email package's copy of the audio test
file, needed because some binary distros (read RPMs) don't include the test module in their standard Python package. This eliminates an external dependency and closes SF bug # 650441.
-rw-r--r--Lib/email/test/test_email.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py
index df6c350957..7c79739bd6 100644
--- a/Lib/email/test/test_email.py
+++ b/Lib/email/test/test_email.py
@@ -769,8 +769,13 @@ Blah blah blah
# Test the basic MIMEAudio class
class TestMIMEAudio(unittest.TestCase):
def setUp(self):
- # In Python, audiotest.au lives in Lib/test not Lib/test/data
- fp = open(findfile('audiotest.au'), 'rb')
+ # Make sure we pick up the audiotest.au that lives in email/test/data.
+ # In Python, there's an audiotest.au living in Lib/test but that isn't
+ # included in some binary distros that don't include the test
+ # package. The trailing empty string on the .join() is significant
+ # since findfile() will do a dirname().
+ datadir = os.path.join(os.path.dirname(landmark), 'data', '')
+ fp = open(findfile('audiotest.au', datadir), 'rb')
try:
self._audiodata = fp.read()
finally: