forked from platformio/platformio-core
Fix tests
This commit is contained in:
@ -357,7 +357,7 @@ int main() {
|
|||||||
assert low_result.exit_code != 0
|
assert low_result.exit_code != 0
|
||||||
|
|
||||||
|
|
||||||
def test_check_pvs_studio_free_license(clirunner, isolated_pio_core, tmpdir):
|
def test_check_pvs_studio_free_license(clirunner, tmpdir):
|
||||||
config = """
|
config = """
|
||||||
[env:test]
|
[env:test]
|
||||||
platform = teensy
|
platform = teensy
|
||||||
|
@ -114,13 +114,13 @@ def test_ci_lib_and_board(clirunner, tmpdir_factory, validate_cliresult):
|
|||||||
[
|
[
|
||||||
join(
|
join(
|
||||||
storage_dir,
|
storage_dir,
|
||||||
"OneWire_ID1",
|
"OneWire",
|
||||||
"examples",
|
"examples",
|
||||||
"DS2408_Switch",
|
"DS2408_Switch",
|
||||||
"DS2408_Switch.pde",
|
"DS2408_Switch.pde",
|
||||||
),
|
),
|
||||||
"-l",
|
"-l",
|
||||||
join(storage_dir, "OneWire_ID1"),
|
join(storage_dir, "OneWire"),
|
||||||
"-b",
|
"-b",
|
||||||
"uno",
|
"uno",
|
||||||
],
|
],
|
||||||
|
@ -56,14 +56,14 @@ def test_global_install_registry(clirunner, validate_cliresult, isolated_pio_cor
|
|||||||
|
|
||||||
items1 = [d.basename for d in isolated_pio_core.join("lib").listdir()]
|
items1 = [d.basename for d in isolated_pio_core.join("lib").listdir()]
|
||||||
items2 = [
|
items2 = [
|
||||||
"ArduinoJson_ID64",
|
"ArduinoJson",
|
||||||
"ArduinoJson_ID64@5.10.1",
|
"ArduinoJson@5.10.1",
|
||||||
"NeoPixelBus_ID547",
|
"NeoPixelBus",
|
||||||
"AsyncMqttClient_ID346",
|
"AsyncMqttClient",
|
||||||
"ESPAsyncTCP_ID305",
|
"ESPAsyncTCP",
|
||||||
"AsyncTCP_ID1826",
|
"AsyncTCP",
|
||||||
"Adafruit PN532_ID29",
|
"Adafruit PN532",
|
||||||
"Adafruit BusIO_ID6214",
|
"Adafruit BusIO",
|
||||||
]
|
]
|
||||||
assert set(items1) == set(items2)
|
assert set(items1) == set(items2)
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ def test_global_install_archive(clirunner, validate_cliresult, isolated_pio_core
|
|||||||
assert result.exit_code != 0
|
assert result.exit_code != 0
|
||||||
|
|
||||||
items1 = [d.basename for d in isolated_pio_core.join("lib").listdir()]
|
items1 = [d.basename for d in isolated_pio_core.join("lib").listdir()]
|
||||||
items2 = ["ArduinoJson", "SomeLib_ID54", "OneWire_ID1", "ESP32WebServer"]
|
items2 = ["ArduinoJson", "SomeLib_ID54", "OneWire", "ESP32WebServer"]
|
||||||
assert set(items1) >= set(items2)
|
assert set(items1) >= set(items2)
|
||||||
|
|
||||||
|
|
||||||
@ -135,11 +135,6 @@ def test_install_duplicates(clirunner, validate_cliresult, without_internet):
|
|||||||
validate_cliresult(result)
|
validate_cliresult(result)
|
||||||
assert "is already installed" in result.output
|
assert "is already installed" in result.output
|
||||||
|
|
||||||
# by ID
|
|
||||||
result = clirunner.invoke(cmd_lib, ["-g", "install", "29"])
|
|
||||||
validate_cliresult(result)
|
|
||||||
assert "is already installed" in result.output
|
|
||||||
|
|
||||||
# archive
|
# archive
|
||||||
result = clirunner.invoke(
|
result = clirunner.invoke(
|
||||||
cmd_lib,
|
cmd_lib,
|
||||||
@ -276,7 +271,7 @@ def test_global_lib_uninstall(clirunner, validate_cliresult, isolated_pio_core):
|
|||||||
[
|
[
|
||||||
"-g",
|
"-g",
|
||||||
"uninstall",
|
"uninstall",
|
||||||
"1",
|
"OneWire",
|
||||||
"https://github.com/bblanchon/ArduinoJson.git",
|
"https://github.com/bblanchon/ArduinoJson.git",
|
||||||
"ArduinoJson@!=5.6.7",
|
"ArduinoJson@!=5.6.7",
|
||||||
"Adafruit PN532",
|
"Adafruit PN532",
|
||||||
@ -290,15 +285,15 @@ def test_global_lib_uninstall(clirunner, validate_cliresult, isolated_pio_core):
|
|||||||
"platformio-libmirror",
|
"platformio-libmirror",
|
||||||
"PubSubClient",
|
"PubSubClient",
|
||||||
"ArduinoJson@src-69ebddd821f771debe7ee734d3c7fa81",
|
"ArduinoJson@src-69ebddd821f771debe7ee734d3c7fa81",
|
||||||
"ESPAsyncTCP_ID305",
|
"ESPAsyncTCP",
|
||||||
"ESP32WebServer",
|
"ESP32WebServer",
|
||||||
"NeoPixelBus_ID547",
|
"NeoPixelBus",
|
||||||
"PJON",
|
"PJON",
|
||||||
"AsyncMqttClient_ID346",
|
"AsyncMqttClient",
|
||||||
"ArduinoJson_ID64",
|
"ArduinoJson",
|
||||||
"SomeLib_ID54",
|
"SomeLib_ID54",
|
||||||
"PJON@src-79de467ebe19de18287becff0a1fb42d",
|
"PJON@src-79de467ebe19de18287becff0a1fb42d",
|
||||||
"AsyncTCP_ID1826",
|
"AsyncTCP",
|
||||||
]
|
]
|
||||||
assert set(items1) == set(items2)
|
assert set(items1) == set(items2)
|
||||||
|
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
from platformio.commands.update import cli as cmd_update
|
from platformio.commands.update import cli as cmd_update
|
||||||
|
|
||||||
|
|
||||||
def test_update(clirunner, validate_cliresult):
|
def test_update(clirunner, validate_cliresult, isolated_pio_core):
|
||||||
matches = ("Platform Manager", "Up-to-date", "Library Manager")
|
matches = ("Platform Manager", "Library Manager")
|
||||||
result = clirunner.invoke(cmd_update, ["--only-check"])
|
result = clirunner.invoke(cmd_update, ["--only-check"])
|
||||||
validate_cliresult(result)
|
validate_cliresult(result)
|
||||||
assert all([m in result.output for m in matches])
|
assert all([m in result.output for m in matches])
|
||||||
|
Reference in New Issue
Block a user