-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
tests(integration): improve test_hello_world #1305
tests(integration): improve test_hello_world #1305
Conversation
Bad commit message. Instead of |
Codecov Report
@@ Coverage Diff @@
## master #1305 +/- ##
==========================================
+ Coverage 83.14% 83.84% +0.69%
==========================================
Files 95 101 +6
Lines 6544 6733 +189
==========================================
+ Hits 5441 5645 +204
+ Misses 1103 1088 -15
Continue to review full report at Codecov.
|
b66cdca
to
7af663a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't get the point of this test. The original test_helloworld
is to check whether jina hello-world
can be successfully executed. If the subprocess failed, a CalledProcessError
will be thrown.
@nan-wang as it's described here: #1304 I think that test test_helloworld(tmpdir) doesn't "really" test if we are calling hello-world. The result tells if jina hello-world was called and any option which accepts --workdir parameter was executed properly. It makes a risk that other script will be executed, it won't be hello-world and it will still pass the test. Test which is added by me stops after it will recognize that hello world script was being executed. It's not a big time cost. |
tests/integration/test_helloworld.py
Outdated
@@ -13,10 +13,29 @@ | |||
|
|||
|
|||
@pytest.mark.timeout(360) | |||
def test_helloworld(tmpdir): | |||
def test_helloworld_call(tmpdir): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then why keep this one as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that it would be better to don't have two asserts in one test, so every test will test other functionality. Now, I don't see any benefit for such approach in this case. I will make one test.
recheckcla |
Jina CLA check ✅ All Contributors have signed the CLA. |
@bio-howard Thanks for the contribution! To merge it you need to sign the CLA as stated above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I have read the CLA Document and I hereby sign the CLA. |
recheckcla |
No description provided.