Issue 19265: Increased test coverage for datetime pickling (original) (raw)
I guess the extra coverage is in "if getstate" branch of
class tzinfo: ... def reduce(self): getinitargs = getattr(self, "getinitargs", None) if getinitargs: args = getinitargs() else: args = () getstate = getattr(self, "getstate", None) if getstate: state = getstate() else: state = getattr(self, "dict", None) or None if state is None: return (self.class, args) else: return (self.class, args, state)
The other branch is probably covered by timezone class tests. The patch looks good to me.