All scripts/tests: always specify file encoding in calls to open() (#8882)

This commit is contained in:
Samuel T authored and GitHub committed 2022-10-11 22:29:36 +01:00
1 parent 5ca2d77f85
commit 573ee94f35
9 files changed
+18 -18

No files matched your search

@@ -44,8 +44,8 @@ requests.post("http://httpbin.org/anything", data=b"foobar").json()["data"]
requests.post("http://httpbin.org/anything", data="foobar").json()["data"]
# Files
requests.post("http://httpbin.org/anything", data=open("/tmp/foobar", "rb")).json()["data"]
requests.post("http://httpbin.org/anything", data=open("/tmp/foobar", "r")).json()["data"]
requests.post("http://httpbin.org/anything", data=open("/tmp/foobar", "rb", encoding="UTF-8")).json()["data"]
requests.post("http://httpbin.org/anything", data=open("/tmp/foobar", "r", encoding="UTF-8")).json()["data"]
# Mappings
requests.post("http://httpbin.org/anything", data={b"foo": b"bar"}).json()["form"]