def test_delete_first(self):
     expected = PositionalList.from_iterable('bc')
     pl = PositionalList()
     a = pl.add_first('a')
     b = pl.add_after(a, 'b')
     c = pl.add_last('c')
     db = pl.delete(a)
     self.assertEqual(pl, expected)
     self.assertEqual(db, 'a')
 def test_delete_len(self):
     pl = PositionalList()
     a = pl.add_first('a')
     b = pl.add_after(a, 'b')
     c = pl.add_last('c')
     d = pl.add_after(c, 'd')
     self.assertEqual(len(pl), 4)
     pl.delete(a)
     self.assertEqual(len(pl), 3)
     pl.delete(pl.first())
     self.assertEqual(len(pl), 2)
     pl.delete(pl.last())
     self.assertEqual(len(pl), 1)
     self.assertTrue(pl)
     pl.delete(c)
     self.assertEqual(len(pl), 0)
     self.assertFalse(pl)