add test for float_to_srt_time_format
Browse files- tests/test_captions.py +7 -0
tests/test_captions.py
CHANGED
@@ -1,6 +1,13 @@
|
|
1 |
from pytube import Caption, CaptionQuery
|
2 |
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
def test_caption_query_all():
|
5 |
caption1 = Caption(
|
6 |
{"url": "url1", "name": {"simpleText": "name1"}, "languageCode": "en"}
|
|
|
1 |
from pytube import Caption, CaptionQuery
|
2 |
|
3 |
|
4 |
+
def test_float_to_srt_time_format():
|
5 |
+
caption1 = Caption(
|
6 |
+
{"url": "url1", "name": {"simpleText": "name1"}, "languageCode": "en"}
|
7 |
+
)
|
8 |
+
assert caption1.float_to_srt_time_format(3.89) == "00:00:03,890"
|
9 |
+
|
10 |
+
|
11 |
def test_caption_query_all():
|
12 |
caption1 = Caption(
|
13 |
{"url": "url1", "name": {"simpleText": "name1"}, "languageCode": "en"}
|