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')
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')
def test_confirm_matrix_scalars(self): confirm_matrix_scalars = confirm_matrix(first_matrix) self.assertEqual(confirm_matrix_scalars, 'Argument is a 2-dimensional list')