summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-03-01 19:10:26 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2013-03-01 19:10:26 (GMT)
commit4b843a7492af142c9213c8eae9536ea1e9b25e65 (patch)
tree5bf049406c3b5441f08897c3d3f2d862aec8b5ef /Lib
parentdc99e0d396fbdc6632f36e104edb15b4e45266bc (diff)
downloadcpython-4b843a7492af142c9213c8eae9536ea1e9b25e65.zip
cpython-4b843a7492af142c9213c8eae9536ea1e9b25e65.tar.gz
cpython-4b843a7492af142c9213c8eae9536ea1e9b25e65.tar.bz2
#17312: unlink a file that test_aifc was leaving around.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_aifc.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_aifc.py b/Lib/test/test_aifc.py
index 34589f2..98d43e4 100644
--- a/Lib/test/test_aifc.py
+++ b/Lib/test/test_aifc.py
@@ -331,12 +331,14 @@ class AIFCLowLevelTest(unittest.TestCase):
def test_write_aiff_by_extension(self):
sampwidth = 2
- fout = self.fout = aifc.open(TESTFN + '.aiff', 'wb')
+ filename = TESTFN + '.aiff'
+ fout = self.fout = aifc.open(filename, 'wb')
+ self.addCleanup(unlink, filename)
fout.setparams((1, sampwidth, 1, 1, b'ULAW', b''))
frames = b'\x00' * fout.getnchannels() * sampwidth
fout.writeframes(frames)
fout.close()
- f = self.f = aifc.open(TESTFN + '.aiff', 'rb')
+ f = self.f = aifc.open(filename, 'rb')
self.assertEqual(f.getcomptype(), b'NONE')
f.close()