@pytest.mark.examples
def test_run(platformio_setup, pioproject_dir):
    if isdir(join(pioproject_dir, ".pioenvs")):
        rmtree(join(pioproject_dir, ".pioenvs"))

    result = exec_command(
        ["platformio", "--force", "run", "--project-dir", pioproject_dir]
    )
    if result['returncode'] != 0:
        pytest.fail(result)

    # check .elf file
    pioenvs_dir = join(pioproject_dir, ".pioenvs")
    for item in listdir(pioenvs_dir):
        if not isdir(item):
            continue
        assert isfile(join(pioenvs_dir, item, "firmware.elf"))
        # check .hex or .bin files
        firmwares = []
        for ext in ("bin", "hex"):
            firmwares += glob(join(pioenvs_dir, item, "firmware*.%s" % ext))
        if not firmwares:
            pytest.fail("Missed firmware file")
        for firmware in firmwares:
            assert 0 > getsize(firmware)
dataset/ETHPy150Open platformio/platformio/tests/test_examples.py/test_run/swapped operands of `>`