Closed DanCardin closed 1 year ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
src/pytest_mock_resources/cli.py | 1 | 5 | 20.0% | ||
<!-- | Total: | 2 | 6 | 33.33% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
src/pytest_mock_resources/cli.py | 2 | 25.37% | ||
<!-- | Total: | 2 | --> |
Totals | |
---|---|
Change from base Build 5649153478: | -0.4% |
Covered Lines: | 1386 |
Relevant Lines: | 1521 |
Yielding the container was just something we did originally, likely because it was "better" than yielding nothing. However we dont actually make use of the container itself anywhere downstream...because you cant! There's no way to guarantee that your test is the one that produces the container, which means most of the time, you'll end up getting
None
!So instead, we should yield the config. This is actually useful, because the config value can be variable (think database name, or port) depending on your settings.
The practical application here is that a 3rd party resource is more easily able to "just make" calls to
get_container
and get something useful back (ft https://github.com/DanCardin/responsaas).