From 5b9c5dd45fc5446a1c2f6c1fce571ad504e4d9ce Mon Sep 17 00:00:00 2001 From: simon wu <wswday@sina.com> Date: Mon, 15 Jul 2019 19:32:31 +0800 Subject: [PATCH] Require an operation(Save or Show the results) when testing (#993) * Require an operation(Save or Show the results) when testing * using parentheses --- tools/test.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/test.py b/tools/test.py index e33a0c4..0078db5 100644 --- a/tools/test.py +++ b/tools/test.py @@ -128,6 +128,10 @@ def parse_args(): def main(): args = parse_args() + assert args.out or args.show, \ + ('Please specify at least one operation (save or show the results) ' + 'with the argument "--out" or "--show"') + if args.out is not None and not args.out.endswith(('.pkl', '.pickle')): raise ValueError('The output file must be a pkl file.') -- GitLab