diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-09-05 21:08:44 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-09-05 21:08:44 +0200 |
| commit | 9ee11257a37b71187f326b166837150b95a802a9 (patch) | |
| tree | f8c407d63b290bcfcaf9653b0c7896783fd9824c /UpdateManager | |
| parent | 243e1e9917a332a50397cf542d42dadfc3b5c43c (diff) | |
| download | python-apt-9ee11257a37b71187f326b166837150b95a802a9.tar.gz | |
* tests/test_aptsources.py:
- added unittest code and implement some basic tests for the aptsources.py
code
* UpdateManager/Common/aptsources.py:
- added __eq__ method to SourceEntry
Diffstat (limited to 'UpdateManager')
| -rw-r--r-- | UpdateManager/Common/aptsources.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/UpdateManager/Common/aptsources.py b/UpdateManager/Common/aptsources.py index 1fa080da..b5fa050d 100644 --- a/UpdateManager/Common/aptsources.py +++ b/UpdateManager/Common/aptsources.py @@ -90,6 +90,14 @@ class SourceEntry: self.template = None self.children = [] + def __eq__(self, other): + return (self.disabled == other.disabled and + self.type == other.type and + self.uri == other.uri and + self.dist == other.dist and + self.comps == other.comps) + + # works mostely like split but takes [] into account def mysplit(self, line): line = string.strip(line) |
