Skip to content

Commit

Permalink
Merge pull request #2 from KimmyXYC/main
Browse files Browse the repository at this point in the history
fix: Auto test for bcc2srt
  • Loading branch information
sudoskys committed Apr 22, 2023
2 parents 489cd02 + afb19d7 commit 67ce6c7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion test/test.bcc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"font_size": 0.4, "font_color": "#FFFFFF", "background_alpha": 0.5, "background_color": "#9C27B0", "Stroke": "none", "body": [{"from": 0.0, "to": 5.36, "location": 2, "content": "字幕001"}, {"from": 6.45, "to": 9.49, "location": 2, "content": "字幕003\n字幕004"}, {"from": 9.49, "to": 17.49, "location": 2, "content": "字幕004"}, {"from": 17.49, "to": 18.36, "location": 2, "content": "字幕005"}, {"from": 18.36, "to": 20.36, "location": 2, "content": "字幕005\n字幕006"}, {"from": 20.36, "to": 22.2, "location": 2, "content": "字幕006"}]}
{"font_size": 0.4, "font_color": "#FFFFFF", "background_alpha": 0.5, "background_color": "#9C27B0", "Stroke": "none", "body": [{"from": 0, "to": 5.36, "location": 2, "content": "字幕001"}, {"from": 6.45, "to": 9.49, "location": 2, "content": "字幕002"}, {"from": 17.49, "to": 20.36, "location": 2, "content": "字幕003"}, {"from": 25.36, "to": 27.2, "location": 2, "content": "字幕004"}]}
16 changes: 6 additions & 10 deletions test/test.srt
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@
00:00:00,000 --> 00:00:05,360
字幕001

3
2
00:00:06,450 --> 00:00:09,490
字幕002

3
00:00:17,490 --> 00:00:20,360
字幕003

4
00:00:06,450 --> 00:00:17,490
00:00:25,360 --> 00:00:27,200
字幕004

5
00:00:17,490 --> 00:00:20,360
字幕005

6
00:00:18,360 --> 00:00:22,200
字幕006
2 changes: 1 addition & 1 deletion test/test_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_SeeAvailableMethods(self):
assert type(method) == list

def test_module(self):
names = ["srt2bcc"]
names = ["bcc2srt"]
for name in names:
pre = name.split("2")[0]
aft = name.split("2")[1]
Expand Down

0 comments on commit 67ce6c7

Please sign in to comment.