コード例 #1
0
    def test_multireplace_near_bounds(self):
        expected = ['0', '1', '2', '3', '4', 'fox' ]
        self.assertEqual(replace_doubleitem(self._input, 5, 'fox'), expected)

        expected = ['fox', '2', '3', '4', '5' ]
        self.assertEqual(replace_doubleitem(self._input, 0, 'fox'), expected)
コード例 #2
0
 def test_replace_doubleitem(self):
     expected = ['0', '1', 'fox', '4', '5']
     self.assertEqual(replace_doubleitem(self._input, 2, 'fox'), expected)