aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_language.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2013-06-16 00:30:13 +0200
committerMaximilian Hils <git@maximilianhils.com>2013-06-16 00:30:13 +0200
commit0382b809ea7dcaf91a81cc3ab506f83a341a20b6 (patch)
tree3468c07b2e7b5a99bc26ed98d276afa2a968c342 /test/test_language.py
parent9e7f08acea55e2da53f5f2c93d6948c447cf1861 (diff)
downloadmitmproxy-0382b809ea7dcaf91a81cc3ab506f83a341a20b6.tar.gz
mitmproxy-0382b809ea7dcaf91a81cc3ab506f83a341a20b6.tar.bz2
mitmproxy-0382b809ea7dcaf91a81cc3ab506f83a341a20b6.zip
always read files in binary mode
Diffstat (limited to 'test/test_language.py')
-rw-r--r--test/test_language.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_language.py b/test/test_language.py
index 40967935..18865761 100644
--- a/test/test_language.py
+++ b/test/test_language.py
@@ -95,7 +95,7 @@ class TestValueFile:
v = language.Value.parseString("<path")[0]
with tutils.tmpdir() as t:
p = os.path.join(t, "path")
- f = open(p, "w")
+ f = open(p, "wb")
f.write("x"*10000)
f.close()
@@ -143,7 +143,7 @@ class TestMisc:
def test_filegenerator(self):
with tutils.tmpdir() as t:
path = os.path.join(t, "foo")
- f = open(path, "w")
+ f = open(path, "wb")
f.write("x"*10000)
f.close()
g = language.FileGenerator(path)