Add a simple test for ffmpeg

This commit is contained in:
Kovid Goyal 2024-10-09 21:05:12 +05:30
parent 3792654953
commit 346c6ad2ed
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -308,6 +308,11 @@ class BuildTest(unittest.TestCase):
m.close()
self.assertEqual(winutil.parse_cmdline('"c:\\test exe.exe" "some arg" 2'), ('c:\\test exe.exe', 'some arg', '2'))
def test_ffmpeg(self):
from calibre_extensions.ffmpeg import resample_raw_audio_16bit
data = os.urandom(22050 * 2)
resample_raw_audio_16bit(data, 22050, 44100)
def test_sqlite(self):
import sqlite3
conn = sqlite3.connect(':memory:')