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)
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)
def test_octant_of_angle_for_w_ok(): assert geom.octant_of_angle(180) == 'W'
def test_octant_of_angle_for_se_ok(): assert geom.octant_of_angle(90 - 1) == 'SE'
def test_octant_of_angle_for_e_ok(): assert geom.octant_of_angle(0) == 'E'
def test_octant_of_angle_for_s_ok(): assert geom.octant_of_angle(90) == 'S'
def test_octant_of_angle_for_n_ok(): assert geom.octant_of_angle(270) == 'N'
def test_octant_of_angle_float_stat(angle): assert geom.octant_of_angle(angle) in ('N', 'S', 'E', 'W', 'NE', 'NW', 'SE', 'SW')
def test_octant_of_angle_for_x_ok(): assert geom.octant_of_angle(object()) == 'X'
def test_octant_of_angle_for_ne_ok(): assert geom.octant_of_angle(270 + 1) == 'NE'
def test_octant_of_angle_for_sw_ok(): assert geom.octant_of_angle(90 + 1) == 'SW'
def test_octant_of_angle_for_nw_ok(): assert geom.octant_of_angle(270 - 1) == 'NW'