summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/unittest_fileutils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/unittest_fileutils.py b/test/unittest_fileutils.py
index a43b60f..555e73f 100644
--- a/test/unittest_fileutils.py
+++ b/test/unittest_fileutils.py
@@ -55,7 +55,8 @@ class GetModeTC(TestCase):
class NormReadTC(TestCase):
def test_known_values_norm_read(self):
- data = io.open(NEWLINES_TXT).read()
+ with io.open(NEWLINES_TXT) as f:
+ data = f.read()
self.assertEqual(data.strip(), '\n'.join(['# mixed new lines', '1', '2', '3']))