コード例 #1
0
 def test_add_before_a_in_abc(self):
     pl = PositionalList()
     a = pl.add_last('a')
     b = pl.add_last('b')
     c = pl.add_last('c')
     forty_two = pl.add_before(a, 42)
     actual_before_forty_two = pl.before(forty_two)
     self.assertIsNone(actual_before_forty_two)
コード例 #2
0
 def test_add_before_b_in_abc(self):
     pl = PositionalList()
     a = pl.add_last('a')
     b = pl.add_last('b')
     c = pl.add_last('c')
     forty_two = pl.add_before(b, 42)
     expected_before_forty_two = a
     actual_before_forty_two = pl.before(forty_two)
     self.assertEqual(expected_before_forty_two, actual_before_forty_two)