hbmartin commited on
Commit
3783a2f
·
1 Parent(s): 15fde2f

add test for float_to_srt_time_format

Browse files
Files changed (1) hide show
  1. 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"}