From 670b6c26d920bd56d211f97bb03b2bf3a4457069 Mon Sep 17 00:00:00 2001 From: xumingkuan Date: Wed, 15 Jul 2020 15:26:24 -0400 Subject: [PATCH] [cli] Fix "AttributeError" of pytest arguments --- python/taichi/main.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/python/taichi/main.py b/python/taichi/main.py index b55e32e348cbb..765257e3e57cc 100644 --- a/python/taichi/main.py +++ b/python/taichi/main.py @@ -718,19 +718,19 @@ def _test_python(args): pytest_args += ['-s', '-v'] if args.rerun: pytest_args += ['--reruns', args.rerun] - if args.keys: - pytest_args += ['-k', args.keys] - if args.marks: - pytest_args += ['-m', args.marks] - if args.failed_first: - pytest_args += ['--failed-first'] - if args.fail_fast: - pytest_args += ['--exitfirst'] try: if args.coverage: pytest_args += ['--cov-branch', '--cov=python/taichi'] if args.cov_append: pytest_args += ['--cov-append'] + if args.keys: + pytest_args += ['-k', args.keys] + if args.marks: + pytest_args += ['-m', args.marks] + if args.failed_first: + pytest_args += ['--failed-first'] + if args.fail_fast: + pytest_args += ['--exitfirst'] except AttributeError: pass