encode / httpx

A next generation HTTP client for Python. 🦋
https://www.python-httpx.org/
BSD 3-Clause "New" or "Revised" License
12.7k stars 811 forks source link

tests: fix win32 #3172

Open trim21 opened 2 months ago

trim21 commented 2 months ago

Summary

There are several test cases broken on windows.

Checklist

trim21 commented 1 month ago

coverage failed because this:

https://github.com/encode/httpx/blob/fa6dac8383541669f42086d4f07c71b0f8d6a279/httpx/_multipart.py#L127-L134

io.StringIO is a subclass of io.TextIOBase

trim21 commented 1 month ago

I just use pytest's tmp_path to create a real file on disk. pytest will clean it up after test.