forked from platformio/platformio-core
Added support for the latest Python "Click" package (CLI Builder) // Resolve #349
This commit is contained in:
1 parent
7687a0a929
commit
62b80c396b
11 files changed
+75
-58
No files matched your search
@@ -57,7 +57,7 @@ def test_init_duplicated_boards(clirunner, validate_cliresult, tmpdir):
|
||||
def test_init_ide_without_board(clirunner, tmpdir):
|
||||
with tmpdir.as_cwd():
|
||||
result = clirunner.invoke(cmd_init, ["--ide", "atom"])
|
||||
assert result.exit_code == -1
|
||||
assert result.exit_code != 0
|
||||
assert isinstance(result.exception, exception.ProjectEnvsNotAvailable)
|
||||
|
||||
|
||||
|
||||
@@ -16,8 +16,11 @@ import json
|
||||
import re
|
||||
|
||||
from platformio import exception
|
||||
from platformio.commands import PlatformioCLI
|
||||
from platformio.commands.lib import cli as cmd_lib
|
||||
|
||||
PlatformioCLI.leftover_args = ["--json-output"] # hook for click
|
||||
|
||||
|
||||
def test_search(clirunner, validate_cliresult):
|
||||
result = clirunner.invoke(cmd_lib, ["search", "DHT22"])
|
||||
|
||||
@@ -38,14 +38,14 @@ def test_search_raw_output(clirunner, validate_cliresult):
|
||||
def test_install_unknown_version(clirunner):
|
||||
result = clirunner.invoke(cli_platform.platform_install,
|
||||
["atmelavr@99.99.99"])
|
||||
assert result.exit_code == -1
|
||||
assert result.exit_code != 0
|
||||
assert isinstance(result.exception, exception.UndefinedPackageVersion)
|
||||
|
||||
|
||||
def test_install_unknown_from_registry(clirunner):
|
||||
result = clirunner.invoke(cli_platform.platform_install,
|
||||
["unknown-platform"])
|
||||
assert result.exit_code == -1
|
||||
assert result.exit_code != 0
|
||||
assert isinstance(result.exception, exception.UnknownPackage)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user