示例#1
0
def test_get_x_coordinates_nan():
    shape = Shape({
        'x_number': np.nan,
        'x_start': 84000,
        'x_step': 500,
        'x_stop': 155000,
        'y_number': 143,
        'y_start': 455000,
        'y_step': 500,
        'y_stop': 526000
    })

    x = shape.get_x_coordinates()
    assert False
示例#2
0
def test_get_x_coordinates():
    shape = Shape({
        'x_number': 143,
        'x_start': 84000,
        'x_step': 500,
        'x_stop': 155000,
        'y_number': 143,
        'y_start': 455000,
        'y_step': 500,
        'y_stop': 526000
    })

    x = shape.get_x_coordinates()

    assert len(x) == shape.x_number