Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
estyxx authored and finswimmer committed Oct 11, 2020
1 parent 2db820d commit 3b3791d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/console/commands/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import pytest

from poetry.config.config_source import ConfigSource
from poetry.core.pyproject import PyProjectException
from poetry.factory import Factory


Expand All @@ -12,6 +13,16 @@ def tester(command_tester_factory):
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):
tester.execute("--list")

Expand Down

0 comments on commit 3b3791d

Please sign in to comment.