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

[TODO] Hit 100% coverage in multidict/_multidict_base.py #921

Closed
webknjaz opened this issue Jan 16, 2024 · 2 comments
Closed

[TODO] Hit 100% coverage in multidict/_multidict_base.py #921

webknjaz opened this issue Jan 16, 2024 · 2 comments

Comments

@webknjaz
Copy link
Member

Currently, the coverage of this module is partial. Staring at https://app.codecov.io/github/aio-libs/multidict/commit/61f241fbfc4b507e8c44d7d8e60d3fc4414cc91f/blob/multidict/_multidict_base.py will help the contributor identify fully or partially uncovered lines.

The related tests are in https://github.com/aio-libs/multidict/blob/master/tests/test_multidict.py. The contributions can be made in small chunks. Submitting even a single test that improves coverage is great! It's also easier to accept/review smaller PRs.

In most cases, making new tests can be done by example. Starting with copying an existing test and tweaking it to hit different code branches...

@Jamim
Copy link
Contributor

Jamim commented Jan 19, 2024

Hi @webknjaz,

It's nice that this project have the highest coverage target possible, but the fact that Codecav enforces this target makes any PR marked with ❌ now, even though a PR could increase coverage, such as #927. I suggest disabling that check or lowering the target until 100% coverage is actually achieved.

Thanks!

@webknjaz
Copy link
Member Author

That check is not enforced. Besides, due to Codecov's flakiness, it's not always accurate.

webknjaz added a commit that referenced this issue Feb 1, 2024
Specifically, this patch covers the cases of the dunder methods
returning `NotImplemented` and handling non-`Set` `Iterable`s.

It fully covers the `_viewbaseset_and()`, `_viewbaseset_or()`,
`_viewbaseset_sub()` and `_viewbaseset_xor()` functions in the
`multidict._multidict_base` module with functional tests.

Ref #921
PR #936

Signed-off-by: a5r0n <a5r0n@users.noreply.github.com>
Co-authored-by: a5r0n <a5r0n@users.noreply.github.com>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants