Add Python module test (#17)

This commit is contained in:
bashonly
2025-10-23 12:59:59 -05:00
committed by GitHub
parent 5d7bf090bb
commit 52a4f9d19a
6 changed files with 78 additions and 5 deletions

0
test/__init__.py Normal file
View File

18
test/test_modules.py Normal file
View File

@@ -0,0 +1,18 @@
import unittest
from pathlib import Path
import yt_dlp_ejs.yt.solver
BASE_PATH = Path(__file__).parent.parent
CORE_PATH = BASE_PATH / 'yt_dlp_ejs/yt/solver/core.min.js'
LIB_PATH = BASE_PATH / 'yt_dlp_ejs/yt/solver/lib.min.js'
class TestModules(unittest.TestCase):
def test_yt_solver(self):
self.assertEqual(yt_dlp_ejs.yt.solver.core(), CORE_PATH.read_text(encoding='utf-8'))
self.assertEqual(yt_dlp_ejs.yt.solver.lib(), LIB_PATH.read_text(encoding='utf-8'))
if __name__ == '__main__':
unittest.main()