def test_quadroots_zerocoeff(): try: rt.quad_roots(a=0.0) except ValueError as err: assert (sys.exc_info()[0] == ValueError)
def test_quadroots(): assert rt.quad_roots(1.0, 1.0, -12.0) == ((3 + 0j), (-4 + 0j))
def test_quadroots_types(): with pytest.raises(TypeError): roots.quad_roots("", "green", "hi")
def test_quadroots_types(): try: rt.quad_roots("", "green", "hi") except TypeError as err: assert (sys.exc_info()[0] == TypeError)
def test_quadroots_zerocoeff(): with pytest.raises(ValueError): roots.quad_roots(a=0.0)
def test_quadroots_result(): assert roots.quad_roots(1.0, 1.0, -12.0) == ((3+0j), (-4+0j))
def test_quadroots_types(): try: roots.quad_roots("", "green", "hi") except TypeError as err: assert(type(err) == TypeError)
def test_quadroots_imagresult(): assert roots.quad_roots(1.0, 0.0, 1.0) == ((0+1j), (0-1j))
def test_quadroots_zerocoeff(): try: roots.quad_roots(a=0.0) except ValueError as err: assert(type(err) == ValueError)
def test_quadroots_result(): # random comment assert roots.quad_roots(1.0, 1.0, -12.0) == ((3+0j), (-4+0j))
def test_quadroots_types(): with pytest.raises(TypeError): roots.quad_roots("saul", "elephante", ["hi", "correct", "list", "connotation"])