Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Auto test for bcc2srt #2

Merged
merged 2 commits into from
Apr 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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