diff options
author | Olivier Tilloy <olivier@tilloy.net> | 2009-04-30 08:30:52 +0200 |
---|---|---|
committer | Olivier Tilloy <olivier@tilloy.net> | 2009-04-30 08:30:52 +0200 |
commit | 4ce12957776efb87f2cf110a63eebaab39c227c2 (patch) | |
tree | fc21ba4c1c7997f00120c2585c1c94c1eda71ecc /unittest/notifying_list.py | |
parent | 73230664fba218f598bf7b7f9e110fa346bf5622 (diff) | |
download | pyexiv2-4ce12957776efb87f2cf110a63eebaab39c227c2.tar.gz |
Removed a useless unit test.
Diffstat (limited to 'unittest/notifying_list.py')
-rw-r--r-- | unittest/notifying_list.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/unittest/notifying_list.py b/unittest/notifying_list.py index 4ba463e..52baac0 100644 --- a/unittest/notifying_list.py +++ b/unittest/notifying_list.py @@ -75,31 +75,6 @@ class TestNotifyingList(unittest.TestCase): self.failUnlessRaises(NotImplementedError, self.values.insert, 4, 24) # TODO: test all operations (insertion, slicing, ...) - def test_one_listener(self): - listener = SimpleListener() - self.values.register_listener(listener) - self.values[3] = 13 - self.failUnlessEqual(self.values, [5, 7, 9, 13, 57, 3, 2]) - self.failUnlessEqual(listener.notifications, 1) - self.failUnlessEqual(listener.last, ('item_changed', (3, 13))) - del self.values[5] - self.failUnlessEqual(self.values, [5, 7, 9, 13, 57, 2]) - self.failUnlessEqual(listener.notifications, 2) - self.failUnlessEqual(listener.last, ('item_deleted', (5,))) - self.values.append(17) - self.failUnlessEqual(self.values, [5, 7, 9, 13, 57, 2, 17]) - self.failUnlessEqual(listener.notifications, 3) - self.failUnlessEqual(listener.last, ('item_appended', (17,))) - self.values.extend([11, 22]) - self.failUnlessEqual(self.values, [5, 7, 9, 13, 57, 2, 17, 11, 22]) - self.failUnlessEqual(listener.notifications, 4) - self.failUnlessEqual(listener.last, ('extended', ([11, 22],))) - self.values.insert(4, 24) - self.failUnlessEqual(self.values, [5, 7, 9, 13, 24, 57, 2, 17, 11, 22]) - self.failUnlessEqual(listener.notifications, 5) - self.failUnlessEqual(listener.last, ('item_inserted', (4, 24))) - # TODO: test all operations (slicing, ...) - def test_multiple_listeners(self): # Register a random number of listeners listeners = [SimpleListener() for i in xrange(random.randint(3, 20))] |