MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_write_deprecations

Method test_write_deprecations

Lib/test/test_wave.py:149–164  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

147 self.assertIsNone(reader.getmarkers())
148
149 def test_write_deprecations(self):
150 with io.BytesIO(b'') as tmpfile:
151 with wave.open(tmpfile, 'wb') as writer:
152 writer.setnchannels(1)
153 writer.setsampwidth(1)
154 writer.setframerate(1)
155 writer.setcomptype('NONE', 'not compressed')
156
157 with self.assertWarns(DeprecationWarning):
158 with self.assertRaises(wave.Error):
159 writer.setmark(0, 0, 'mark')
160 with self.assertWarns(DeprecationWarning):
161 with self.assertRaises(wave.Error):
162 writer.getmark('mark')
163 with self.assertWarns(DeprecationWarning):
164 self.assertIsNone(writer.getmarkers())
165
166
167class WaveLowLevelTest(unittest.TestCase):

Callers

nothing calls this directly

Calls 11

setnchannelsMethod · 0.80
setsampwidthMethod · 0.80
setframerateMethod · 0.80
setcomptypeMethod · 0.80
assertWarnsMethod · 0.80
setmarkMethod · 0.80
assertIsNoneMethod · 0.80
openMethod · 0.45
assertRaisesMethod · 0.45
getmarkMethod · 0.45
getmarkersMethod · 0.45

Tested by

no test coverage detected