summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/tests/test_create.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-05-19 13:51:27 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-05-19 13:51:27 (GMT)
commit21a9c748aa8698c8201e30a58320d587f6bb7540 (patch)
treeddfcb60a800bc010237ee750a449c4639e5515e3 /Lib/packaging/tests/test_create.py
parent0e3f3a70760f5ef1c0d1f7baf55046514b6bfbb6 (diff)
downloadcpython-21a9c748aa8698c8201e30a58320d587f6bb7540.zip
cpython-21a9c748aa8698c8201e30a58320d587f6bb7540.tar.gz
cpython-21a9c748aa8698c8201e30a58320d587f6bb7540.tar.bz2
packaging: use with open() instead of try/finally: close
Diffstat (limited to 'Lib/packaging/tests/test_create.py')
-rw-r--r--Lib/packaging/tests/test_create.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/packaging/tests/test_create.py b/Lib/packaging/tests/test_create.py
index 99ab063..9c7a912 100644
--- a/Lib/packaging/tests/test_create.py
+++ b/Lib/packaging/tests/test_create.py
@@ -173,11 +173,8 @@ class CreateTestCase(support.TempdirManager,
dedent("""
# -*- coding: utf-8 -*-
from distutils.core import setup
- fp = open('README.txt')
- try:
+ with open('README.txt') as fp:
long_description = fp.read()
- finally:
- fp.close()
setup(name='pyxfoil',
version='0.2',