Пример #1
0
 def test_remove(self):
     ml = MessageLoop()
     ml.items = ['f00', 'bar']
     self.assertEqual("f00", ml.getitem(0))
     ml.remove(0)
     self.assertEqual(['bar'], ml.items)
     self.assertEqual("bar", ml.getitem(0))
Пример #2
0
 def test_remove(self):
     ml = MessageLoop()
     ml.items = ["f00", "bar"]
     self.assertEqual("f00", ml.getitem(0))
     ml.remove(0)
     self.assertEqual(["bar"], ml.items)
     self.assertEqual("bar", ml.getitem(0))
Пример #3
0
 def test_remove(self):
     ml = MessageLoop()
     ml.items = ['f00', 'bar']
     self.assertEqual("f00", ml.getitem(0))
     ml.remove(0)
     self.assertEqual(['bar'], ml.items)
     self.assertEqual("bar", ml.getitem(0))
Пример #4
0
 def test_three_elements(self):
     ml = MessageLoop()
     ml.items = ["f001", "f002", "f003"]
     self.assertEqual("f001", ml.getnext())
     self.assertEqual("f002", ml.getnext())
     self.assertEqual("f003", ml.getnext())
     self.assertEqual("f001", ml.getnext())
     self.assertEqual("f002", ml.getnext())
     self.assertEqual("f003", ml.getnext())
Пример #5
0
 def test_three_elements(self):
     ml = MessageLoop()
     ml.items = ['f001', 'f002', 'f003']
     self.assertEqual('f001', ml.getnext())
     self.assertEqual('f002', ml.getnext())
     self.assertEqual('f003', ml.getnext())
     self.assertEqual('f001', ml.getnext())
     self.assertEqual('f002', ml.getnext())
     self.assertEqual('f003', ml.getnext())
Пример #6
0
 def test_three_elements(self):
     ml = MessageLoop()
     ml.items = ['f001', 'f002', 'f003']
     self.assertEqual('f001', ml.getnext())
     self.assertEqual('f002', ml.getnext())
     self.assertEqual('f003', ml.getnext())
     self.assertEqual('f001', ml.getnext())
     self.assertEqual('f002', ml.getnext())
     self.assertEqual('f003', ml.getnext())
Пример #7
0
 def test_clear(self):
     ml = MessageLoop()
     ml.items = ["f00", "bar"]
     ml.clear()
     self.assertEqual([], ml.items)
Пример #8
0
 def test_getitem(self):
     ml = MessageLoop()
     ml.items = ["f00"]
     self.assertEqual("f00", ml.getitem(0))
     self.assertEqual(None, ml.getitem(1))
Пример #9
0
 def test_one_element(self):
     ml = MessageLoop()
     ml.items = ["f00"]
     self.assertEqual("f00", ml.getnext())
     self.assertEqual("f00", ml.getnext())
Пример #10
0
 def test_clear(self):
     ml = MessageLoop()
     ml.items = ['f00', 'bar']
     ml.clear()
     self.assertEqual([], ml.items)
Пример #11
0
 def test_getitem(self):
     ml = MessageLoop()
     ml.items = ['f00']
     self.assertEqual("f00", ml.getitem(0))
     self.assertEqual(None, ml.getitem(1))
Пример #12
0
 def test_one_element(self):
     ml = MessageLoop()
     ml.items = ['f00']
     self.assertEqual('f00', ml.getnext())
     self.assertEqual('f00', ml.getnext())
Пример #13
0
 def test_clear(self):
     ml = MessageLoop()
     ml.items = ['f00', 'bar']
     ml.clear()
     self.assertEqual([], ml.items)
Пример #14
0
 def test_one_element(self):
     ml = MessageLoop()
     ml.items = ['f00']
     self.assertEqual('f00', ml.getnext())
     self.assertEqual('f00', ml.getnext())