diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2017-09-29 15:26:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-09-29 15:26:56 +0100 |
| commit | 651f97af37171b03b7181208d820c3a925961e13 (patch) | |
| tree | e7ecc9ed1b3e3bd49ec7542ce93c7081d2011f70 /setuptools | |
| parent | f7ac232981d3d01e3c76890ae28da75859790dbe (diff) | |
| parent | b1e47b43f3d2b972057ebe4c564b0ed03d39cd3d (diff) | |
| download | external_python_setuptools-651f97af37171b03b7181208d820c3a925961e13.tar.gz external_python_setuptools-651f97af37171b03b7181208d820c3a925961e13.tar.bz2 external_python_setuptools-651f97af37171b03b7181208d820c3a925961e13.zip | |
Merge pull request #1152 from jdufresne/resource-warnings
Clean up resource warnings during tests
Diffstat (limited to 'setuptools')
| -rw-r--r-- | setuptools/tests/test_egg_info.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index e454694d..1411f93c 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -164,7 +164,8 @@ class TestEggInfo(object): self._run_install_command(tmpdir_cwd, env) egg_info_dir = self._find_egg_info_files(env.paths['lib']).base sources_txt = os.path.join(egg_info_dir, 'SOURCES.txt') - assert 'docs/usage.rst' in open(sources_txt).read().split('\n') + with open(sources_txt) as f: + assert 'docs/usage.rst' in f.read().split('\n') def _setup_script_with_requires(self, requires, use_setup_cfg=False): setup_script = DALS( @@ -447,7 +448,8 @@ class TestEggInfo(object): self._run_install_command(tmpdir_cwd, env) egg_info_dir = self._find_egg_info_files(env.paths['lib']).base pkginfo = os.path.join(egg_info_dir, 'PKG-INFO') - assert 'Requires-Python: >=1.2.3' in open(pkginfo).read().split('\n') + with open(pkginfo) as f: + assert 'Requires-Python: >=1.2.3' in f.read().split('\n') def test_manifest_maker_warning_suppression(self): fixtures = [ |
