'Check that we can access attribute of an optional'

def test_optional_array_attribute(self):

    def pyfunc(arr, do_it):
        opt = None
        if do_it:
            opt = arr
        return opt.shape[0]
    cfunc = njit(pyfunc)
    arr = np.arange(5)
    self.assertEqual(pyfunc(arr, True), cfunc(arr, True))
