예제 #1
0
 def test_confirm_matrix_string(self):
     confirm_matrix_string = confirm_matrix(bad_matrix_buried_string)
     self.assertEqual(confirm_matrix_string,
                      'Argument is a 2-dimensional list')
예제 #2
0
 def test_confirm_matrix_nested_raises(self):
     with self.assertRaises(Exception) as context:
         confirm_matrix(bad_matrix_nested)
     self.assertEqual(type(context.exception), TypeError)
     self.assertEqual(str(context.exception),
                      'Argument must be a 2-dimensional list')
예제 #3
0
 def test_confirm_matrix_scalars(self):
     confirm_matrix_scalars = confirm_matrix(first_matrix)
     self.assertEqual(confirm_matrix_scalars,
                      'Argument is a 2-dimensional list')