diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2015-12-25 10:23:52 -0500 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-12-25 10:23:52 -0500 |
| commit | 57809ecf386e1c87bfbed81baf4a3d7f9af9dbbe (patch) | |
| tree | a470479286df1618bd475174475543befea7d9c0 | |
| parent | 41eb0370e323d67715aebb1404890709c50cd018 (diff) | |
| download | python-setuptools-git-57809ecf386e1c87bfbed81baf4a3d7f9af9dbbe.tar.gz | |
Separate _find_egg_info_files into two methods, one for each of the needed outputs.
| -rw-r--r-- | setuptools/tests/test_egg_info.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 74beb7f5..e92ef920 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -60,7 +60,7 @@ class TestEggInfo(object): self._create_project() self._run_install_command(tmpdir_cwd, env) - _, actual = self._find_egg_info_files(env.paths['lib']) + actual = self._find_egg_info_files(env.paths['lib']) expected = [ 'PKG-INFO', @@ -83,7 +83,7 @@ class TestEggInfo(object): } }) self._run_install_command(tmpdir_cwd, env) - egg_info_dir, _ = self._find_egg_info_files(env.paths['lib']) + egg_info_dir = self._find_egg_info_dir(env.paths['lib']) sources_txt = os.path.join(egg_info_dir, 'SOURCES.txt') assert 'docs/usage.rst' in open(sources_txt).read().split('\n') @@ -107,12 +107,15 @@ class TestEggInfo(object): if code: raise AssertionError(data) - def _find_egg_info_files(self, root): + def _find_egg_info_dir(self, root): results = ( - (dirpath, filenames) + dirpath for dirpath, dirnames, filenames in os.walk(root) if os.path.basename(dirpath) == 'EGG-INFO' ) # expect exactly one result result, = results return result + + def _find_egg_info_files(self, root): + return os.listdir(self._find_egg_info_dir(root)) |
