def test_clear(self): q = Queue(hub=self.hub) q.append('an item') q.append('another item') self.assertEqual(len(q), 2) q.clear() self.assertEqual(len(q), 0)