summaryrefslogtreecommitdiff
path: root/UpdateManager
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-09-05 21:08:44 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-09-05 21:08:44 +0200
commit9ee11257a37b71187f326b166837150b95a802a9 (patch)
treef8c407d63b290bcfcaf9653b0c7896783fd9824c /UpdateManager
parent243e1e9917a332a50397cf542d42dadfc3b5c43c (diff)
downloadpython-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.py8
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)