예제 #1
0
def test_axis_name_circle_adjust_nw_ok():
    angle, font_size_pts, text_angle = 270 - 1, 1, 0
    font_name, axis_name, axis_name_space_sep = "Invisible", "Look", None
    args = (angle, font_size_pts, text_angle, font_name, axis_name,
            axis_name_space_sep)
    assert geom.octant_of_angle(angle) == 'NW'
    assert geom.axis_name_circle_adjust(*args) == (-205, -5)
예제 #2
0
def test_axis_name_circle_adjust_s_ok():
    angle, font_size_pts, text_angle = 90, 1, 0
    font_name, axis_name, axis_name_space_sep = "Invisible", "Look", None
    args = (angle, font_size_pts, text_angle, font_name, axis_name,
            axis_name_space_sep)
    assert geom.octant_of_angle(angle) == 'S'
    assert geom.axis_name_circle_adjust(*args) == (-100, 210)
예제 #3
0
def test_octant_of_angle_for_w_ok():
    assert geom.octant_of_angle(180) == 'W'
예제 #4
0
def test_octant_of_angle_for_se_ok():
    assert geom.octant_of_angle(90 - 1) == 'SE'
예제 #5
0
def test_octant_of_angle_for_e_ok():
    assert geom.octant_of_angle(0) == 'E'
예제 #6
0
def test_octant_of_angle_for_s_ok():
    assert geom.octant_of_angle(90) == 'S'
예제 #7
0
def test_octant_of_angle_for_n_ok():
    assert geom.octant_of_angle(270) == 'N'
예제 #8
0
def test_octant_of_angle_float_stat(angle):
    assert geom.octant_of_angle(angle) in ('N', 'S', 'E', 'W', 'NE', 'NW',
                                           'SE', 'SW')
예제 #9
0
def test_octant_of_angle_for_x_ok():
    assert geom.octant_of_angle(object()) == 'X'
예제 #10
0
def test_octant_of_angle_for_ne_ok():
    assert geom.octant_of_angle(270 + 1) == 'NE'
예제 #11
0
def test_octant_of_angle_for_sw_ok():
    assert geom.octant_of_angle(90 + 1) == 'SW'
예제 #12
0
def test_octant_of_angle_for_nw_ok():
    assert geom.octant_of_angle(270 - 1) == 'NW'