Fix testdata path separator
This commit is contained in:
@@ -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__)
|
||||||
|
|||||||
@@ -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])
|
||||||
|
|||||||
Reference in New Issue
Block a user