pytest_container
pytest_container copied to clipboard
Make test infra optional
Codecov Report
Attention: Patch coverage is 81.57895% with 7 lines in your changes missing coverage. Please review.
Project coverage is 94.39%. Comparing base (
4a7314e) to head (c2c8822).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| pytest_container/container.py | 73.33% | 4 Missing :warning: |
| pytest_container/helpers.py | 72.72% | 3 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #239 +/- ##
==========================================
- Coverage 96.73% 94.39% -2.34%
==========================================
Files 9 9
Lines 1101 1124 +23
Branches 164 159 -5
==========================================
- Hits 1065 1061 -4
- Misses 23 41 +18
- Partials 13 22 +9
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Working on the coverage.
I saw this comment recently: https://github.com/dcermak/pytest_container/pull/231#discussion_r1807308461
I don't think that it is maintainable to start implementing a subset of testinfra in pytest_container. I think all that we should offer is check_output. If a user doesn't wish to use testinfra, then that's fine by me, but then they should handle these checks by themself.
I think I overworked this PR.
I touched the existing test cases to remove the host object from test infra and use run command from helpers.
But, i think now that all we need to do is
- [ ] just enable the user to not use test infra if they want to
- [ ] add unit tests for containerRemoteEndPoint module
- [ ] Existing test cases should never be changed
- [ ] Only need to make sure that files in pytest_container module is not using
hostobject from testinfra - [ ] It is user's responsibility about how they use containerRemoteEndPoint, we'll do only unit tests for this module
@dcermak , please confirm and add if any additional stuff is needed.
I saw this comment recently: #231 (comment)
dcermak Oct 19, 2024 I don't think that it is maintainable to start implementing a subset of testinfra in pytest_container. I think all that we should offer is check_output. If a user doesn't wish to use testinfra, then that's fine by me, but then they should handle these checks by themself.
I think I overworked this PR.
A bit:
I touched the existing test cases to remove the
hostobject from test infra and use run command from helpers. But, i think now that all we need to do is
- just enable the user to not use test infra if they want to
- add unit tests for containerRemoteEndPoint module
- Existing test cases should never be changed
- Only need to make sure that files in pytest_container module is not using
hostobject from testinfra- It is user's responsibility about how they use containerRemoteEndPoint, we'll do only unit tests for this module
@dcermak , please confirm and add if any additional stuff is needed.
I would that you start in a separate PR with the removal of the host from pytest_container