'Issue 2314'

def test_trace_w_optional_input(self):

    @jit('(optional(float64[:,:]),)', nopython=True)
    def tested(a):
        return np.trace(a)
    a = np.ones((5, 5), dtype=np.float64)
    tested(a)
    with self.assertRaises(TypeError) as raises:
        tested(None)
    errmsg = str(raises.exception)
    self.assertEqual('expected    array(float64,    2d,    A),    got    None', errmsg)
