예제 #1
0
    def test_replace03(self):
        "Not found."
        flist = FluentList([1])

        with self.assertRaises(ValueError):
            flist.replace(old=2, new=3)
예제 #2
0
 def test_replace01(self):
     flist = FluentList([1, 2])
     flist.replace(old=1, new=3)
     self.assertEqual([3, 2], flist)
예제 #3
0
 def test_replace02(self):
     "Other index."
     flist = FluentList([1, 2])
     flist.replace(old=2, new=3)
     self.assertEqual([1, 3], flist)