Beispiel #1
0
 def test_noNext(self):
     """ Test that None is returned when there is no next item in the list """
     expected = None
     item = 2
     l = KaoList([1, item])
     self.assertEqual(expected, l.next(item))
Beispiel #2
0
 def test_noPrevious(self):
     """ Test that None is returned when there is no previous item in the list """
     expected = None
     item = 2
     l = KaoList([item, 1])
     self.assertEqual(expected, l.previous(item))
Beispiel #3
0
 def test_hasNext(self):
     """ Test that the next element is returned when it exists """
     expected = 1
     item = 2
     l = KaoList([item, expected])
     self.assertEqual(expected, l.next(item))
Beispiel #4
0
 def test_hasPrevious(self):
     """ Test that the previous element is returned when it exists """
     expected = 1
     item = 2
     l = KaoList([expected, item])
     self.assertEqual(expected, l.previous(item))