mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 18:17:13 +02:00
Fix test for pio lib show
command
This commit is contained in:
@ -17,7 +17,7 @@ PlatformIO 3.0
|
||||
* Show detailed info about a library using `pio lib show <http://docs.platformio.org/page/userguide/lib/cmd_show.html>`__
|
||||
command
|
||||
(`issue #430 <https://github.com/platformio/platformio-core/issues/430>`_)
|
||||
* Added support for templated methods in ``*.ino to *.cpp`` convertor
|
||||
* Added support for templated methods in ``*.ino to *.cpp`` converter
|
||||
(`pull #858 <https://github.com/platformio/platformio-core/pull/858>`_)
|
||||
* Produce less noisy output when ``-s/--silent`` options are used for
|
||||
`platformio init <http://docs.platformio.org/page/userguide/cmd_init.html>`__
|
||||
|
@ -100,24 +100,6 @@ def test_global_lib_list(clirunner, validate_cliresult, isolated_pio_home):
|
||||
assert set(items1) == set(items2)
|
||||
|
||||
|
||||
def test_global_lib_show(clirunner, validate_cliresult, isolated_pio_home):
|
||||
result = clirunner.invoke(cmd_lib, ["-g", "show", "64@5.6.7"])
|
||||
validate_cliresult(result)
|
||||
assert all([
|
||||
s in result.output for s in ("Json", "arduino", "atmelavr", "5.6.7")
|
||||
])
|
||||
|
||||
result = clirunner.invoke(cmd_lib, ["-g", "show", "ArduinoJson@>5.6.7"])
|
||||
validate_cliresult(result)
|
||||
assert all(
|
||||
[s in result.output for s in ("ArduinoJson", "arduino", "atmelavr")])
|
||||
assert "5.6.7" not in result.output
|
||||
|
||||
result = clirunner.invoke(cmd_lib, ["-g", "show", "1"])
|
||||
validate_cliresult(result)
|
||||
assert "OneWire" in result.output
|
||||
|
||||
|
||||
def test_global_lib_update(clirunner, validate_cliresult, isolated_pio_home):
|
||||
result = clirunner.invoke(cmd_lib, ["-g", "update"])
|
||||
validate_cliresult(result)
|
||||
@ -139,6 +121,17 @@ def test_global_lib_uninstall(clirunner, validate_cliresult,
|
||||
assert set(items1) == set(items2)
|
||||
|
||||
|
||||
def test_lib_show(clirunner, validate_cliresult, isolated_pio_home):
|
||||
result = clirunner.invoke(cmd_lib, ["show", "64"])
|
||||
validate_cliresult(result)
|
||||
assert all([
|
||||
s in result.output for s in ("ArduinoJson", "arduino", "atmelavr")
|
||||
])
|
||||
result = clirunner.invoke(cmd_lib, ["show", "OneWire"])
|
||||
validate_cliresult(result)
|
||||
assert "OneWire" in result.output
|
||||
|
||||
|
||||
def test_project_lib_complex(clirunner, validate_cliresult, tmpdir):
|
||||
with tmpdir.as_cwd():
|
||||
# init
|
||||
|
Reference in New Issue
Block a user