def test_replace03(self): "Not found." flist = FluentList([1]) with self.assertRaises(ValueError): flist.replace(old=2, new=3)
def test_replace01(self): flist = FluentList([1, 2]) flist.replace(old=1, new=3) self.assertEqual([3, 2], flist)
def test_replace02(self): "Other index." flist = FluentList([1, 2]) flist.replace(old=2, new=3) self.assertEqual([1, 3], flist)