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
42fb4513
Unverified
Commit
42fb4513
authored
Jun 28, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests
parent
97de0a3a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
tests/console/commands/test_config.py
+13
-2
No files found.
tests/console/commands/test_config.py
View file @
42fb4513
...
@@ -16,15 +16,25 @@ def config():
...
@@ -16,15 +16,25 @@ def config():
return
Config
(
TomlFile
(
f
.
name
))
return
Config
(
TomlFile
(
f
.
name
))
@pytest.fixture
(
autouse
=
True
)
def
setup
(
config
):
config
.
add_property
(
"settings.virtualenvs.path"
,
"."
)
yield
config
.
remove_property
(
"settings.virtualenvs.path"
)
def
test_list_displays_default_value_if_not_set
(
app
,
config
):
def
test_list_displays_default_value_if_not_set
(
app
,
config
):
command
=
app
.
find
(
"config"
)
command
=
app
.
find
(
"config"
)
command
.
_config
=
config
command
.
_config
=
Config
(
config
.
file
)
tester
=
CommandTester
(
command
)
tester
=
CommandTester
(
command
)
tester
.
execute
([(
"command"
,
command
.
get_name
()),
(
"--list"
,
True
)])
tester
.
execute
([(
"command"
,
command
.
get_name
()),
(
"--list"
,
True
)])
expected
=
"""settings.virtualenvs.create = true
expected
=
"""settings.virtualenvs.create = true
settings.virtualenvs.in-project = false
settings.virtualenvs.in-project = false
settings.virtualenvs.path = "."
repositories = {}
repositories = {}
"""
"""
...
@@ -33,7 +43,7 @@ repositories = {}
...
@@ -33,7 +43,7 @@ repositories = {}
def
test_list_displays_set_get_setting
(
app
,
config
):
def
test_list_displays_set_get_setting
(
app
,
config
):
command
=
app
.
find
(
"config"
)
command
=
app
.
find
(
"config"
)
command
.
_config
=
config
command
.
_config
=
Config
(
config
.
file
)
tester
=
CommandTester
(
command
)
tester
=
CommandTester
(
command
)
tester
.
execute
(
tester
.
execute
(
...
@@ -49,6 +59,7 @@ def test_list_displays_set_get_setting(app, config):
...
@@ -49,6 +59,7 @@ def test_list_displays_set_get_setting(app, config):
expected
=
"""settings.virtualenvs.create = false
expected
=
"""settings.virtualenvs.create = false
settings.virtualenvs.in-project = false
settings.virtualenvs.in-project = false
settings.virtualenvs.path = "."
repositories = {}
repositories = {}
"""
"""
...
...
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