def test_no_sideeffect(self): xs = list(range(10)) ys = list(range(10)) k = q0005.numbering(xs) self.assertEqual(xs, ys) for i in range(10): self.assertEqual((i, i), k[i])
def test_justOne(self): self.assertEqual([(0, 'Zero')], q0005.numbering(['Zero']))
def test_count(self): k = q0005.numbering(list(range(1000))) self.assertEqual(1000, len(k)) for i in range(1000): self.assertEqual((i, i), k[i])
def test_empty(self): self.assertEqual([], q0005.numbering([]))