Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cli] [test] Add some useful pytest arguments #1465

Merged
merged 2 commits into from
Jul 12, 2020

Conversation

archibate
Copy link
Collaborator

Related issue = #

[Click here for the format server]


e.g.:
ti test bitmasked -k huge_bitmasked
will only run the test_bitmasked.py::test_huge_bitmasked.

ti test -x
will exit immediately after first failure occured.

Copy link
Contributor

@xumingkuan xumingkuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMig!

python/taichi/main.py Outdated Show resolved Hide resolved
default=None,
dest='marks',
type=str,
help='Only run tests with specific marks')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What're marks?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e.g.:

@pytest.mark.xumingkuan
def test_hello():
  ...
ti test -m xumingkuan

I'll add a doc later clarify the test infrastructure.

python/taichi/main.py Outdated Show resolved Hide resolved
Co-authored-by: xumingkuan <xumingkuan0721@126.com>
@archibate archibate requested a review from xumingkuan July 12, 2020 02:18
Copy link
Contributor

@xumingkuan xumingkuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@archibate archibate added the LGTM label Jul 12, 2020
@codecov
Copy link

codecov bot commented Jul 12, 2020

Codecov Report

Merging #1465 into master will increase coverage by 0.22%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1465      +/-   ##
==========================================
+ Coverage   66.69%   66.91%   +0.22%     
==========================================
  Files          38       38              
  Lines        5305     5422     +117     
  Branches      948      955       +7     
==========================================
+ Hits         3538     3628      +90     
- Misses       1607     1632      +25     
- Partials      160      162       +2     
Impacted Files Coverage Δ
python/taichi/main.py 41.74% <33.33%> (-0.20%) ⬇️
python/taichi/lang/error.py 14.63% <0.00%> (-12.20%) ⬇️
python/taichi/lang/expr.py 88.95% <0.00%> (-1.05%) ⬇️
python/taichi/lang/ops.py 92.85% <0.00%> (-0.90%) ⬇️
python/taichi/lang/common_ops.py 91.90% <0.00%> (-0.74%) ⬇️
python/taichi/lang/impl.py 90.54% <0.00%> (-0.28%) ⬇️
python/taichi/lang/kernel.py 81.57% <0.00%> (-0.12%) ⬇️
python/taichi/core/util.py 21.72% <0.00%> (ø)
python/taichi/lang/matrix.py 91.41% <0.00%> (+0.22%) ⬆️
python/taichi/lang/util.py 64.91% <0.00%> (+0.62%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 65bf964...5cb601d. Read the comment docs.

@archibate archibate merged commit 96ab837 into taichi-dev:master Jul 12, 2020
@FantasyVR FantasyVR mentioned this pull request Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants