Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
f4ad8509
Commit
f4ad8509
authored
Dec 25, 2015
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wrap the result in a DirList to avoid tuple unpacking and unused variables
parent
41eb0370
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
setuptools/tests/test_egg_info.py
setuptools/tests/test_egg_info.py
+8
-3
No files found.
setuptools/tests/test_egg_info.py
View file @
f4ad8509
...
...
@@ -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_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
'
)
...
...
@@ -108,8 +108,13 @@ class TestEggInfo(object):
raise
AssertionError
(
data
)
def
_find_egg_info_files
(
self
,
root
):
class
DirList
(
list
):
def
__init__
(
self
,
files
,
base
):
super
(
DirList
,
self
).
__init__
(
files
)
self
.
base
=
base
results
=
(
(
dirpath
,
filenames
)
DirList
(
filenames
,
dirpath
)
for
dirpath
,
dirnames
,
filenames
in
os
.
walk
(
root
)
if
os
.
path
.
basename
(
dirpath
)
==
'EGG-INFO'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment