mirror of
https://github.com/platformio/platformio-core.git
synced 2025-10-17 08:15:23 +02:00
Cover "list", "search" and "settings" commands with tests
This commit is contained in:
24
tests/commands/test_settings.py
Normal file
24
tests/commands/test_settings.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
# See LICENSE for details.
|
||||
|
||||
|
||||
from click.testing import CliRunner
|
||||
|
||||
from platformio.commands.settings import cli
|
||||
from platformio import app
|
||||
|
||||
runner = CliRunner()
|
||||
|
||||
|
||||
def validate_output(result):
|
||||
assert result.exit_code == 0
|
||||
assert not result.exception
|
||||
assert "error" not in result.output.lower()
|
||||
|
||||
|
||||
def test_settings_check():
|
||||
result = runner.invoke(cli, ["get"])
|
||||
validate_output(result)
|
||||
assert len(result.output)
|
||||
for item in app.DEFAULT_SETTINGS.items():
|
||||
assert item[0] in result.output
|
Reference in New Issue
Block a user