Commit 3b3791d3 by Etty Committed by finswimmer

Add test

parent 2db820d5
...@@ -4,6 +4,7 @@ import os ...@@ -4,6 +4,7 @@ import os
import pytest import pytest
from poetry.config.config_source import ConfigSource from poetry.config.config_source import ConfigSource
from poetry.core.pyproject import PyProjectException
from poetry.factory import Factory from poetry.factory import Factory
...@@ -12,6 +13,16 @@ def tester(command_tester_factory): ...@@ -12,6 +13,16 @@ def tester(command_tester_factory):
return command_tester_factory("config") return command_tester_factory("config")
def test_show_config_with_local_config_file_empty(tester, mocker):
mocker.patch(
"poetry.factory.Factory.create_poetry",
side_effect=PyProjectException("[tool.poetry] section not found"),
)
tester.execute()
assert "" == tester.io.fetch_output()
def test_list_displays_default_value_if_not_set(tester, config): def test_list_displays_default_value_if_not_set(tester, config):
tester.execute("--list") tester.execute("--list")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment