def test_x_y_intercept_90_degrees_5_inf(self): line = LineModel(1, 0, -5) xintercept_actual = line.xintercept() xintercept_expected = 5 yintercept_actual = line.yintercept() yintercept_expected = math.inf self.assertEqual(xintercept_actual, xintercept_expected) self.assertEqual(yintercept_actual, yintercept_expected)
def test_x_y_intercept_0_degrees_inf_5(self): line = LineModel(0, 1, -5) xintercept_actual = line.xintercept() xintercept_expected = math.inf yintercept_actual = line.yintercept() yintercept_expected = 5 self.assertEqual(xintercept_actual, xintercept_expected) self.assertEqual(yintercept_actual, yintercept_expected)
def test_x_y_intercept_45_degrees_1_0(self): line = LineModel(-1, 1, 1) xintercept_actual = line.xintercept() xintercept_expected = 1 yintercept_actual = line.yintercept() yintercept_expected = -1 self.assertEqual(xintercept_actual, xintercept_expected) self.assertEqual(yintercept_actual, yintercept_expected)