summaryrefslogtreecommitdiff
path: root/docutils/test
diff options
context:
space:
mode:
authorgrubert <grubert@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2019-08-20 12:49:09 +0000
committergrubert <grubert@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2019-08-20 12:49:09 +0000
commit1028c9fdf678c20fa1899da4b421d2c25c02b166 (patch)
treea55ab454f1a7fae069cb78edc187ff2b166361fe /docutils/test
parentf6495542171cf3c0ce477235f954db9f86eef3e9 (diff)
downloaddocutils-1028c9fdf678c20fa1899da4b421d2c25c02b166.tar.gz
Fix some [ 377 ] ResourceWarning: unclosed file
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8326 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test')
-rwxr-xr-xdocutils/test/test_parsers/test_rst/test_directives/test_tables.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_tables.py b/docutils/test/test_parsers/test_rst/test_directives/test_tables.py
index 0cce57809..ed11b3ab2 100755
--- a/docutils/test/test_parsers/test_rst/test_directives/test_tables.py
+++ b/docutils/test/test_parsers/test_rst/test_directives/test_tables.py
@@ -48,7 +48,8 @@ if sys.version_info < (3,3,2):
def null_bytes():
import csv
- csv_data = open(utf_16_csv, 'rb').read()
+ with open(utf_16_csv, 'rb') as f:
+ csv_data = f.read()
csv_data = unicode(csv_data, 'latin1').splitlines()
reader = csv.reader([tables.CSVTable.encode_for_csv(line + '\n')
for line in csv_data])