def check_getstate(self): p=Persistent() assert p.__getstate__() == {} p.a = 1 assert p.__getstate__() == {'a':1}