Exemplo n.º 1
0
def test_single_board():
    m = Machine.single_board("m", set(["default"]), "bmp", "spinn")
    assert m.name == "m"
    assert m.tags == set(["default"])
    assert m.width == 1
    assert m.height == 1
    assert m.dead_boards == set([(0, 0, 1), (0, 0, 2)])
    assert m.dead_links == set()
    assert m.board_locations == {(0, 0, 0): (0, 0, 0)}
    assert m.bmp_ips == {(0, 0): "bmp"}
    assert m.spinnaker_ips == {(0, 0, 0): "spinn"}
def test_single_board():
    m = Machine.single_board("m", set(["default"]), "bmp", "spinn")
    assert m.name == "m"
    assert m.tags == set(["default"])
    assert m.width == 1
    assert m.height == 1
    assert m.dead_boards == set([(0, 0, 1), (0, 0, 2)])
    assert m.dead_links == set()
    assert m.board_locations == {(0, 0, 0): (0, 0, 0)}
    assert m.bmp_ips == {(0, 0): "bmp"}
    assert m.spinnaker_ips == {(0, 0, 0): "spinn"}
Exemplo n.º 3
0
def test_single_board_no_ip():
    with pytest.raises(TypeError):
        Machine.single_board("m", set(["default"]))
    with pytest.raises(TypeError):
        Machine.single_board("m", set(["default"]), bmp_ip="foo")
    with pytest.raises(TypeError):
        Machine.single_board("m", set(["default"]), spinnaker_ip="bar")
def test_single_board_no_ip():
    with pytest.raises(TypeError):
        Machine.single_board("m", set(["default"]))
    with pytest.raises(TypeError):
        Machine.single_board("m", set(["default"]), bmp_ip="foo")
    with pytest.raises(TypeError):
        Machine.single_board("m", set(["default"]), spinnaker_ip="bar")