Fix testdata path separator

This commit is contained in:
taizan-hokuto
2020-03-14 08:16:19 +09:00
parent 21d93613a2
commit 78604c84d4
2 changed files with 6 additions and 5 deletions

View File

@@ -22,9 +22,10 @@ def main():
# Arguments # Arguments
parser = argparse.ArgumentParser(description=f'pytchat v{__version__}') parser = argparse.ArgumentParser(description=f'pytchat v{__version__}')
parser.add_argument('-v', f'--{Arguments.Name.VIDEO}', type=str, parser.add_argument('-v', f'--{Arguments.Name.VIDEO}', type=str,
help='Video IDs separated by commas without space') help='Video IDs separated by commas without space.\n'
'If ID starts with a hyphen (-), enclose the ID in square brackets.')
parser.add_argument('-o', f'--{Arguments.Name.OUTPUT}', type=str, parser.add_argument('-o', f'--{Arguments.Name.OUTPUT}', type=str,
help='Output directory (end with "/")', default='./') help='Output directory (end with "/"). default="./"', default='./')
parser.add_argument(f'--{Arguments.Name.VERSION}', action='store_true', parser.add_argument(f'--{Arguments.Name.VERSION}', action='store_true',
help='Settings version') help='Settings version')
Arguments(parser.parse_args().__dict__) Arguments(parser.parse_args().__dict__)

View File

@@ -36,7 +36,7 @@ def test_process_0():
chat_component = { chat_component = {
'video_id':'', 'video_id':'',
'timeout':10, 'timeout':10,
'chatdata':load_chatdata(r"tests\testdata\calculator\superchat_0.json") 'chatdata':load_chatdata(r"tests/testdata/calculator/superchat_0.json")
} }
assert SuperchatCalculator().process([chat_component])=={'': 6800.0, '': 2.0} assert SuperchatCalculator().process([chat_component])=={'': 6800.0, '': 2.0}
@@ -47,7 +47,7 @@ def test_process_1():
chat_component = { chat_component = {
'video_id':'', 'video_id':'',
'timeout':10, 'timeout':10,
'chatdata':load_chatdata(r"tests\testdata\calculator\text_only.json") 'chatdata':load_chatdata(r"tests/testdata/calculator/text_only.json")
} }
assert SuperchatCalculator().process([chat_component])=={} assert SuperchatCalculator().process([chat_component])=={}
@@ -59,7 +59,7 @@ def test_process_2():
chat_component = { chat_component = {
'video_id':'', 'video_id':'',
'timeout':10, 'timeout':10,
'chatdata':load_chatdata(r"tests\testdata\calculator\replay_end.json") 'chatdata':load_chatdata(r"tests/testdata/calculator/replay_end.json")
} }
assert False assert False
SuperchatCalculator().process([chat_component]) SuperchatCalculator().process([chat_component])