class SilenceTest(unittest.TestCase): def setUp(self): self.silence = Silence(3, 44100) def test_silence(self): self.assertEqual(self.silence.length(), 3) self.assertEqual(self.silence.framerate, 44100) # Gives a bytearray, not bytes. Both have buffer interface and will # work with Wave_write. self.assertEqual(type(self.silence.read_all()), bytearray)
def setUp(self): self.silence = Silence(3, 44100)