Commit 01eaf500 authored by Victor Stinner's avatar Victor Stinner

Issue #22390: Fix test_aifc to remove the created file

parent ac0d1893
......@@ -322,12 +322,16 @@ class AIFCLowLevelTest(unittest.TestCase):
def test_write_aiff_by_extension(self):
sampwidth = 2
fout = self.fout = aifc.open(TESTFN + '.aiff', 'wb')
filename = TESTFN + '.aiff'
self.addCleanup(unlink, filename)
fout = self.fout = aifc.open(filename, 'wb')
fout.setparams((1, sampwidth, 1, 1, 'ULAW', ''))
frames = '\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(), 'NONE')
f.close()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment