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
31b0896b
Commit
31b0896b
authored
Jan 18, 2021
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rely on rootdir to determine the source. Avoids coupling with position in the test suite.
parent
3c8e758c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
setuptools/tests/fixtures.py
setuptools/tests/fixtures.py
+2
-9
No files found.
setuptools/tests/fixtures.py
View file @
31b0896b
import
pathlib
import
shutil
import
pytest
...
...
@@ -27,13 +26,7 @@ def tmpdir_cwd(tmpdir):
@
pytest
.
fixture
def
src_dir
():
"""The project source directory available via fixture."""
return
pathlib
.
Path
(
__file__
).
parents
[
2
]
@
pytest
.
fixture
def
tmp_src
(
src_dir
,
tmp_path
):
def
tmp_src
(
request
,
tmp_path
):
"""Make a copy of the source dir under `$tmp/src`.
This fixture is useful whenever it's necessary to run `setup.py`
...
...
@@ -44,5 +37,5 @@ def tmp_src(src_dir, tmp_path):
when they are not being executed sequentially.
"""
tmp_src_path
=
tmp_path
/
'src'
shutil
.
copytree
(
src_
dir
,
tmp_src_path
)
shutil
.
copytree
(
request
.
config
.
root
dir
,
tmp_src_path
)
return
tmp_src_path
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