Exemplo n.º 1
0
 def test_wrong_length(self):
     try:
         assert_matrix_almost_equal(matrix([[1, 2], [3, 4]]),
                                    matrix([[1, 2, 3], [4, 5, 6]]))
         assert False
     except AssertionError:
         pass
Exemplo n.º 2
0
 def test_wrong_value(self):
     try:
         assert_matrix_almost_equal(matrix([[1, 2], [3, 4]]),
                                    matrix([[1.0000001, 2], [3, 4]]))
         assert False
     except AssertionError:
         pass
Exemplo n.º 3
0
 def test_wrong_value(self):
     try:
         assert_matrix_almost_equal(matrix([[1, 2], [3, 4]]),
                                     matrix([[1.0000001, 2], [3, 4]]))
         assert False
     except AssertionError:
         pass
Exemplo n.º 4
0
 def test_wrong_length(self):
     try:
         assert_matrix_almost_equal(matrix([[1, 2], [3, 4]]),
                                    matrix([[1, 2, 3], [4, 5, 6]]))
         assert False
     except AssertionError:
         pass
Exemplo n.º 5
0
 def test__passes(self):
     assert_matrix_almost_equal(matrix([[1, 2], [3, 4]]),
                                matrix([[1.00000001, 2], [3, 4]]))
     assert_matrix_almost_equal(matrix([[1, 2], [3, 4]]),
                                matrix([[1.0000001, 2], [3, 4]]), 6)
 def test_defaultReferenceValue(self):
     # The following tests depemd on this
     assert_matrix_almost_equal(self.calc._ubcalc.reference.n_phi, matrix([[0], [0], [1]]))
Exemplo n.º 7
0
 def test__passes(self):
     assert_matrix_almost_equal(matrix([[1, 2], [3, 4]]),
                                matrix([[1.00000001, 2], [3, 4]]))
     assert_matrix_almost_equal(matrix([[1, 2], [3, 4]]),
                                matrix([[1.0000001, 2], [3, 4]]), 6)
Exemplo n.º 8
0
 def test_defaultReferenceValue(self):
     # The following tests depemd on this
     assert_matrix_almost_equal(self.calc._ubcalc.n_phi,
                                matrix([[0], [0], [1]]))