Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MargaretDuff committed Oct 9, 2023
1 parent 4b541e7 commit 5a302c8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Wrappers/Python/test/test_BlockOperator.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ def test_norms(self):
self.assertAlmostEqual(G.norm(), numpy.sqrt(8), 2)
self.assertAlmostEqual(G2.norm(), numpy.sqrt(8), 2)
self.assertAlmostEqual(A.norm(), numpy.sqrt(16), 2)
self.assertAlmostEqual(A.norms()[0], numpy.sqrt(8), 2)
self.assertAlmostEqual(A.norms()[1], numpy.sqrt(8), 2)
self.assertAlmostEqual(A.get_norms()[0], numpy.sqrt(8), 2)
self.assertAlmostEqual(A.get_norms()[1], numpy.sqrt(8), 2)


#sets_norm
A.set_norms([2,3])
#gets cached norm
self.assertListEqual(A.norms(), [2,3], 2)
self.assertListEqual(A.get_norms(), [2,3], 2)
self.assertEqual(A.norm(), numpy.sqrt(13))


Expand All @@ -64,8 +64,8 @@ def test_norms(self):
A.set_norms([None, None])
#recalculates norm
self.assertAlmostEqual(A.norm(), numpy.sqrt(16), 2)
self.assertAlmostEqual(A.norms()[0], numpy.sqrt(8), 2)
self.assertAlmostEqual(A.norms()[1], numpy.sqrt(8), 2)
self.assertAlmostEqual(A.get_norms()[0], numpy.sqrt(8), 2)
self.assertAlmostEqual(A.get_norms()[1], numpy.sqrt(8), 2)

#Check the warnings on set_norms
#Check the length of list that is passed
Expand Down

0 comments on commit 5a302c8

Please sign in to comment.