Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
a0904f95
Commit
a0904f95
authored
Apr 10, 2020
by
Arun Babu Neelicattu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: move tmp_venv fixture to conftest
parent
d47b5285
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
tests/conftest.py
+14
-0
tests/utils/test_env.py
+0
-12
No files found.
tests/conftest.py
View file @
a0904f95
...
...
@@ -11,6 +11,8 @@ import pytest
from
poetry.config.config
import
Config
as
BaseConfig
from
poetry.config.dict_config_source
import
DictConfigSource
from
poetry.utils._compat
import
Path
from
poetry.utils.env
import
EnvManager
from
poetry.utils.env
import
VirtualEnv
from
tests.helpers
import
mock_clone
from
tests.helpers
import
mock_download
...
...
@@ -122,3 +124,15 @@ def tmp_dir():
yield
dir_
shutil
.
rmtree
(
dir_
)
@pytest.fixture
def
tmp_venv
(
tmp_dir
):
venv_path
=
Path
(
tmp_dir
)
/
"venv"
EnvManager
.
build_venv
(
str
(
venv_path
))
venv
=
VirtualEnv
(
venv_path
)
yield
venv
shutil
.
rmtree
(
str
(
venv
.
path
))
tests/utils/test_env.py
View file @
a0904f95
...
...
@@ -60,18 +60,6 @@ def manager(poetry):
return
EnvManager
(
poetry
)
@pytest.fixture
def
tmp_venv
(
tmp_dir
,
manager
):
venv_path
=
Path
(
tmp_dir
)
/
"venv"
manager
.
build_venv
(
str
(
venv_path
))
venv
=
VirtualEnv
(
venv_path
)
yield
venv
shutil
.
rmtree
(
str
(
venv
.
path
))
def
test_virtualenvs_with_spaces_in_their_path_work_as_expected
(
tmp_dir
,
manager
):
venv_path
=
Path
(
tmp_dir
)
/
"Virtual Env"
...
...
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