Commit 4303f3bb authored by Serhiy Storchaka's avatar Serhiy Storchaka

Make test_audioop discoverable by unittest.

parent 6af44045
import audioop import audioop
import sys import sys
import unittest import unittest
from test.support import run_unittest
def pack(width, data): def pack(width, data):
return b''.join(v.to_bytes(width, sys.byteorder, signed=True) for v in data) return b''.join(v.to_bytes(width, sys.byteorder, signed=True) for v in data)
...@@ -374,8 +373,5 @@ class TestAudioop(unittest.TestCase): ...@@ -374,8 +373,5 @@ class TestAudioop(unittest.TestCase):
self.assertRaises(audioop.error, audioop.alaw2lin, data, size) self.assertRaises(audioop.error, audioop.alaw2lin, data, size)
self.assertRaises(audioop.error, audioop.adpcm2lin, data, size, state) self.assertRaises(audioop.error, audioop.adpcm2lin, data, size, state)
def test_main():
run_unittest(TestAudioop)
if __name__ == '__main__': if __name__ == '__main__':
test_main() unittest.main()
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