httpx
httpx copied to clipboard
tests: fix win32
Summary
There are several test cases broken on windows.
Checklist
- [X] I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
- [ ] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
- [ ] I've updated the documentation accordingly.
coverage failed because this:
https://github.com/encode/httpx/blob/fa6dac8383541669f42086d4f07c71b0f8d6a279/httpx/_multipart.py#L127-L134
io.StringIO
is a subclass of io.TextIOBase
I just use pytest's tmp_path to create a real file on disk. pytest will clean it up after test.