def test_linearroots(): assert rt.linear_roots(5, 10) == -2
def test_linear_zeroceoff(): try: rt.linear_roots(a=0) except ValueError as err: assert (sys.exc_info()[0] == ValueError)
def test_linearroots_types(): with pytest.raises(TypeError): roots.linear_roots("ocean", 6.0)
def test_linearroots_zerocoeff(): with pytest.raises(ValueError): roots.linear_roots(a=0.0)
def test_linearroots_zerocoeff(): try: roots.linear_roots(a=0.0) except ValueError as err: assert(type(err) == ValueError)
def test_linearoots_result(): assert roots.linear_roots(2.0, -3.0) == 1.5
def test_linearroots_types(): try: roots.linear_roots("ocean", 6.0) except TypeError as err: assert(type(err) == TypeError)
def test_linroots_types(): with pytest.raises(TypeError): roots.linear_roots("o", 9.0)
def test_linroots_result(): assert roots.linear_roots(6.0, -12.0) == 2
def test_linearroots_types(): with pytest.raises(TypeError): roots.linear_roots("", "green", "hi")
def test_linearroots_result(): assert roots.linear_roots(1.0, 2.0) == -2.0