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
34d2c5a1
Commit
34d2c5a1
authored
Sep 06, 2015
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
c8364b9c
3c0d3a91
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
setuptools/__init__.py
setuptools/__init__.py
+3
-2
setuptools/tests/test_setuptools.py
setuptools/tests/test_setuptools.py
+25
-0
No files found.
setuptools/__init__.py
View file @
34d2c5a1
...
...
@@ -140,8 +140,9 @@ class Command(_Command):
distutils
.
core
.
Command
=
Command
def
findall
(
dir
=
os
.
curdir
):
"""Find all files under 'dir' and return the list of full filenames
(relative to 'dir').
"""
Find all files under 'dir' and return the list of full filenames.
Unless dir is '.', return full filenames with dir prepended.
"""
def
_prepend
(
base
):
return
functools
.
partial
(
os
.
path
.
join
,
os
.
path
.
relpath
(
base
,
dir
))
...
...
setuptools/tests/test_setuptools.py
0 → 100644
View file @
34d2c5a1
import
pytest
import
setuptools
@
pytest
.
fixture
def
example_source
(
tmpdir
):
tmpdir
.
mkdir
(
'foo'
)
(
tmpdir
/
'foo/bar.py'
).
write
(
''
)
(
tmpdir
/
'readme.txt'
).
write
(
''
)
return
tmpdir
def
test_findall
(
example_source
):
found
=
list
(
setuptools
.
findall
(
str
(
example_source
)))
expected
=
[
'readme.txt'
,
'foo/bar.py'
]
expected
=
[
example_source
.
join
(
fn
)
for
fn
in
expected
]
assert
found
==
expected
def
test_findall_curdir
(
example_source
):
with
example_source
.
as_cwd
():
found
=
list
(
setuptools
.
findall
())
expected
=
[
'readme.txt'
,
'foo/bar.py'
]
assert
found
==
expected
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