Files
TashaSkyUp-EternalKernelPyt…/tests/test_descript.py
T
Tasha Upchurch 906fec459e - Added test_descript.py to test the DecodeTranscriptNode class.
- Added test_video.py to test the ImageStackToVideoFile class.
- Both tests ensure the functionality and correctness of the respective classes.
2023-06-18 20:33:31 -04:00

16 lines
661 B
Python

from unittest import TestCase
class TestDecodeTranscriptNode(TestCase):
def test_func(self):
from custom_nodes.EternalKernelLiteGraphNodes.descript import DecodeTranscriptNode
node = DecodeTranscriptNode()
string = """[00:00:00] jackie: Let's talk about a
[00:00:01] jackie: thing\n\n[00:00:05] jackie: Let's talk about an apple
"""
speakers, durations, paragraphs = node.func(string)
self.assertEqual(speakers, ["jackie", "jackie", "jackie"])
self.assertEqual(durations, [1, 4, 2])
self.assertEqual(paragraphs, ["Let's talk about a", 'thing', "Let's talk about an apple"])