Conversation
|
Hello, thanks for the proposal, if you can make the existing test suite pass I can review it. But for now some tests are failing, meaning this proposal introduce a regression. |
tests/test_httpx_async.py
Outdated
|
|
||
|
|
||
| @pytest.mark.asyncio | ||
| async def test_url_query_params_bool_matching(httpx_mock: HTTPXMock) -> None: |
There was a problem hiding this comment.
Can you also test with a list of values? in a single param ? With bool, int and str values inside the list in the httpx query, and bool and str on httpx_mock matcher
pytest_httpx/_request_matcher.py
Outdated
| params = { | ||
| k: ( | ||
| primitive_value_to_str(v) | ||
| if isinstance(v, (str, int, float, bool)) |
There was a problem hiding this comment.
Unless I missed something, int and float are not tested
|
@Colin-b Hi! |
tests/test_httpx_internals.py
Outdated
There was a problem hiding this comment.
Unit testing an internal function does not ensure this code is actually reachable for clients. Could you write tests with those values the same way you wrote your other tests ?
|
|
@Colin-b should I add # pragma: no cover ? |
|
@Colin-b Hi! My question is still relevant =) |
There should be no need for it, it is most likely a test scenario missing or unreachable code. I'll check once I have some time. What I can also do, if you don't mind, is merge as is and refactor myself where needed. Up to you |



#197
@Colin-b