From 9ee11257a37b71187f326b166837150b95a802a9 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 5 Sep 2006 21:08:44 +0200 Subject: * 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 --- UpdateManager/Common/aptsources.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'UpdateManager') 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) -- cgit v1.2.3