mirror of
https://github.com/yt-dlp/ejs.git
synced 2026-06-13 08:42:29 +00:00
Add Python module test (#17)
This commit is contained in:
0
test/__init__.py
Normal file
0
test/__init__.py
Normal file
18
test/test_modules.py
Normal file
18
test/test_modules.py
Normal 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()
|
||||
Reference in New Issue
Block a user