From ae7e9efb5ca014291e879694414bbffc982f2a0d Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Wed, 24 May 2017 14:09:41 +0200 Subject: fix various fd/socket leaks --- test/pathod/language/test_base.py | 6 ++++-- test/pathod/language/test_generators.py | 4 +--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'test/pathod/language') diff --git a/test/pathod/language/test_base.py b/test/pathod/language/test_base.py index ec460b07..910d298a 100644 --- a/test/pathod/language/test_base.py +++ b/test/pathod/language/test_base.py @@ -202,12 +202,14 @@ class TestMisc: e.parseString("m@1") s = base.Settings(staticdir=str(tmpdir)) - tmpdir.join("path").write_binary(b"a" * 20, ensure=True) + with open(str(tmpdir.join("path")), 'wb') as f: + f.write(b"a" * 20) v = e.parseString("m