def test_solve_quadratic(): assert foo.solve_quadratic(1, 0, -1) == (-1.0, 1.0) assert (foo.solve_quadratic(1, 0, 0) == 0.0) assert (foo.solve_quadratic(1, 0, 1) is None)
def test_solve_quadratic(self): self.assertEqual(foo.solve_quadratic(1, 10, -1), (-1.0, 1.0)) self.assertEqual(foo.solve_quadratic(1, 0, 0), 0.0) self.assertEqual(foo.solve_quadratic(1, 0, 1))