def test_accepts_matrix_abcd(self): """ Tests if accepts (A, B, C, D) matrices. """ A, B, C, D = self.__build_matrix_abcd() dsf(A=A, B=B, C=C, D=D)
def test_accepts_abcd(self): """ Tests if accepts (A, B, C, D) nested lists. """ A, B, C, D = self.__build_standard_abcd() dsf(A=A, B=B, C=C, D=D)
def test_accept_sys(self): """ Tests if passing a StateSpace as ``sys`` raises no errors. """ [A, B, C, D] = self.__build_standard_abcd() sys = ss(A, B, C, D) dsf(sys=sys)
def test_sys_typecheck(self): """ Tests if passing an invalid type as ``sys`` raises a TypeError. """ with pytest.raises(TypeError): bad_sys = 12 dsf(sys=bad_sys) with pytest.raises(TypeError): bad_sys = True dsf(sys=bad_sys)
def test_require_a(self): """ Tests if at least A is required. """ A, B, C, D = self.__build_standard_abcd() with pytest.raises(ValueError): dsf(C=C) with pytest.raises(ValueError): dsf(B=B) with pytest.raises(ValueError): dsf(B=B, C=C)