-
-
Notifications
You must be signed in to change notification settings - Fork 754
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
Test coverage -> 100% #102
Comments
Hello @tomchristie. I'm a big believer in testing all the things, and I might be willing to help poke at this. My question is what style of testing are you hoping to adopt? End-to-end style functional testing, unit testing with mocks, unit testing against state, integration testing at certain strategic points, or some cross-pollination of all of the above? I personally like testing against features. I have started to lean towards having a cross-cutting functional test for a happy path of a feature, then performing integration testing through third party libraries, and unit testing internally, against state when the final outcome doesn't involve a third party library, or against a mock of an adapter when a third party library is involved, but I'm open to whatever style you're most comfortable with. |
I'd just be pragmatic here.
|
I'll be working on this. |
Do we want to add https://about.codecov.io/ ? |
Not sure about that for the time being, do we have it elsewhere on encode
projects ?
…On Sun, Mar 7, 2021, 6:20 PM Marcelo Trylesinski ***@***.***> wrote:
Do we want to add https://about.codecov.io/ ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#102 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAINSPWO4KHI2PT6AUOHGYDTCOYXHANCNFSM4FHT4USQ>
.
|
Looks like my description on the PR was a bad one 😅 it closed the issue. Sorry about that. |
We need to think about a strategy when we have multiple Python versions, the usual way is to have the coverage merged between all the environment tests, so if line x is covered by Python 3.6, then it means it's already covered. An example: if sys.version_info < (3, 8):
from typing_extensions import Literal, TypedDict # A
else:
from typing import Literal, TypedDict # B To achieve 100% coverage it's impossible, because line A will never be covered by Python >= 3.8 and line B will never be covered by Python < 3.8. But in theory, if Python 3.6 covers line A, and Python 3.8 covers line B, then we have 100% coverage. Suggestions:
|
We handle environment-specific coverage in REST framework by having a Tho I'm also okay with I probably wouldn't go for route (1) or (2) since they're more heavyweight tooling approaches. |
On my quick look, I didn't understand how compat solves that problem exactly. I'm going to check more later. But if
I'm going to open a PR with this today. Hope I'm not missing anything 😅 |
I'm going to focus on the coverage project now, as we're almost finished with the I think we can make use of this coverage plugin to ignore the right environments on the tests and don't over ignore tests. Likewise, I'm going to see if we can really make use of it. |
- Mostly test main as a cli client - Test main functions directly when it's impossible to do is as a cli client (i.e. app non string case) - Add no cover to the module entrypoint main call Related to: encode#102
- Mostly test main as a cli client - Test main functions directly when it's impossible to do is as a cli client (i.e. app non string case) - Add no cover to the module entrypoint main call Related to: #102
- Mostly test main as a cli client - Test main functions directly when it's impossible to do is as a cli client (i.e. app non string case) - Add no cover to the module entrypoint main call Related to: #102
- Mostly test main as a cli client - Test main functions directly when it's impossible to do is as a cli client (i.e. app non string case) - Add no cover to the module entrypoint main call Related to: encode#102
Yes please
Edit by @Kludex:
Report created on 12 July 2021:
Important
The text was updated successfully, but these errors were encountered: