mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Fix test for "pio test"
This commit is contained in:
@ -14,13 +14,16 @@
|
|||||||
|
|
||||||
from os.path import join
|
from os.path import join
|
||||||
|
|
||||||
from platformio.commands.test import cli as cli_test
|
import pytest
|
||||||
|
|
||||||
|
from platformio import util
|
||||||
|
|
||||||
|
|
||||||
def test_local_env(clirunner, validate_cliresult):
|
def test_local_env():
|
||||||
result = clirunner.invoke(
|
result = util.exec_command(["platformio", "test", "-d",
|
||||||
cli_test,
|
join("examples", "unit-testing", "calculator"),
|
||||||
["-d", join("examples", "unit-testing", "calculator"), "-e", "local"])
|
"-e", "local"])
|
||||||
validate_cliresult(result)
|
if result['returncode'] != 0:
|
||||||
|
pytest.fail(result)
|
||||||
assert all(
|
assert all(
|
||||||
[s in result.output for s in ("[PASSED]", "[IGNORED]", "[FAILED]")])
|
[s in result['out'] for s in ("[PASSED]", "[IGNORED]", "[FAILED]")])
|
||||||
|
Reference in New Issue
Block a user