Skip to content

Commit

Permalink
[cli] Fix "AttributeError" of pytest arguments (#1505)
Browse files Browse the repository at this point in the history
  • Loading branch information
xumingkuan authored Jul 16, 2020
1 parent 43c32b8 commit 4db65b0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions python/taichi/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,19 +715,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

Expand Down

0 comments on commit 4db65b0

Please sign in to comment.