aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2016-07-31 20:44:13 -0400
committerJason R. Coombs <jaraco@jaraco.com>2016-07-31 20:44:13 -0400
commit52f72bb8d233ca518f4782c5dd9569c6764c53ef (patch)
tree6ef5c0a093d5ab76752cd21cd8d8e94fdb2330d4
parent6c93713d75f5888cc9654ec23fc05f5b7772b51a (diff)
downloadexternal_python_setuptools-52f72bb8d233ca518f4782c5dd9569c6764c53ef.tar.gz
external_python_setuptools-52f72bb8d233ca518f4782c5dd9569c6764c53ef.tar.bz2
external_python_setuptools-52f72bb8d233ca518f4782c5dd9569c6764c53ef.zip
Extract variable for content
-rw-r--r--setuptools/tests/test_dist_info.py22
1 files changed, 9 insertions, 13 deletions
diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py
index 92ef6e8c..122d94a0 100644
--- a/setuptools/tests/test_dist_info.py
+++ b/setuptools/tests/test_dist_info.py
@@ -29,25 +29,21 @@ class TestDistInfo:
versioned = tmpdir / dist_info_name
versioned.mkdir()
filename = versioned / 'METADATA'
- filename.write_text(
- self.metadata_template.format(
- name='VersionedDistribution',
- version='',
- ).replace('\n\n', '\n'),
- encoding='utf-8',
- )
+ content = self.metadata_template.format(
+ name='VersionedDistribution',
+ version='',
+ ).replace('\n\n', '\n')
+ filename.write_text(content, encoding='utf-8')
dist_info_name = 'UnversionedDistribution.dist-info'
unversioned = tmpdir / dist_info_name
unversioned.mkdir()
filename = unversioned / 'METADATA'
- filename.write_text(
- self.metadata_template.format(
- name='UnversionedDistribution',
- version='Version: 0.3',
- ),
- encoding='utf-8',
+ content = self.metadata_template.format(
+ name='UnversionedDistribution',
+ version='Version: 0.3',
)
+ filename.write_text(content, encoding='utf-8')
return str(tmpdir)