Skip to content

Commit

Permalink
Add and remove pytest in cmake file
Browse files Browse the repository at this point in the history
  • Loading branch information
KybernetikJo committed Aug 30, 2023
1 parent 977919e commit ca8fb3f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
9 changes: 7 additions & 2 deletions slycot/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ set(PYSOURCE
test_ag08bd.py
test_examples.py
test_exceptions.py
test_mb.py
test_mc.py
test_mb03rd.py
test_mb03vd.py
test_mb03vy.py
test_mb03wd.py
test_mb05md.py
test_mb05nd.py
test_mc01td.py
test_sb.py
test_analysis.py
test_transform.py
Expand Down
26 changes: 13 additions & 13 deletions slycot/tests/test_mb03rd.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,21 @@ def test_mb03rd(self):
test1_n, A, X, 'N', sort, test1_pmax, test1_tol)
assert Xr is None

def test_mb03rd_default():
# regression: mb03rd was failing with no third arg (X) supplied
A = np.array([[ 6, -1, -7, -2, 2],
[-3, 4, 2, -7, 6],
[-6, -9, -3, -1, 10],
[-2, -4, 1, 5, 7],
[-7, -5, -6, 6, 7]])
def test_mb03rd_default(self):
# regression: mb03rd was failing with no third arg (X) supplied
A = np.array([[ 6, -1, -7, -2, 2],
[-3, 4, 2, -7, 6],
[-6, -9, -3, -1, 10],
[-2, -4, 1, 5, 7],
[-7, -5, -6, 6, 7]])

Aschur, Tschur = schur(A)
Aschur, Tschur = schur(A)

X = Tschur.copy()
X = Tschur.copy()

Ar, Xr, blsize, W = mb03rd(Aschur.shape[0], Aschur, X, 'U', 'N', pmax=1.0, tol=0.0)
Ar, Xr, blsize, W = mb03rd(Aschur.shape[0], Aschur, X, 'U', 'N', pmax=1.0, tol=0.0)

Ar2, Xr2, blsize2, W2 = mb03rd(Aschur.shape[0], Aschur)
Ar2, Xr2, blsize2, W2 = mb03rd(Aschur.shape[0], Aschur)

assert_allclose(Ar, Ar2)
assert_allclose(Xr, Tschur.dot(Xr2))
assert_allclose(Ar, Ar2)
assert_allclose(Xr, Tschur.dot(Xr2))

0 comments on commit ca8fb3f

Please sign in to comment.