Comments
Patch
@@ -30,6 +30,15 @@ class config(object):
return section in self._data
def __getitem__(self, section):
return self._data.get(section, {})
+ def __eq__(self, other):
+ return (isinstance(other, config) and
+ # Data and source are sortdict
+ other._data.items() == self._data.items() and
+ other._source.items() == self._source.items() and
+ other._unset == self._unset and
+ other._includepaths == self._includepaths)
+ def __ne__(self, other):
+ return not self == other
def __hash__(self):
return self.computehash()
def __iter__(self):