def test_board_options(platformio_setup, clirunner, validate_cliresult):
    required_opts = set(
        ["build", "platform", "upload", "name"])

    # fetch available platforms
    result = clirunner.invoke(cmd_platforms_search, ["--json-output"])
    validate_cliresult(result)
    search_result = json.loads(result.output)
    assert isinstance(search_result, list)
    assert len(search_result)
    platforms = [item['type'] for item in search_result]

    for _, opts in util.get_boards().iteritems():
        assert required_opts.issubset(set(opts))
        assert opts['platform'] in platforms
dataset/ETHPy150Open platformio/platformio/tests/commands/test_boards.py/test_board_options/original