def METHOD_NAME(self):
    # CArray and Array validate the default at class creation time;
    # we do the same for ArrayOrNone.
    with self.assertRaises(TraitError):
        class Bar(HasTraits):
            bad_array = ArrayOrNone(shape=(None, None), value=[1, 2, 3])