(self)
| 444 | |
| 445 | @support.cpython_only |
| 446 | def test_field_repr(self): |
| 447 | Point = namedtuple('Point', 'x y') |
| 448 | self.assertEqual(repr(Point.x), "_tuplegetter(0, 'Alias for field number 0')") |
| 449 | self.assertEqual(repr(Point.y), "_tuplegetter(1, 'Alias for field number 1')") |
| 450 | |
| 451 | Point.x.__doc__ = 'The x-coordinate' |
| 452 | Point.y.__doc__ = 'The y-coordinate' |
| 453 | |
| 454 | self.assertEqual(repr(Point.x), "_tuplegetter(0, 'The x-coordinate')") |
| 455 | self.assertEqual(repr(Point.y), "_tuplegetter(1, 'The y-coordinate')") |
| 456 | |
| 457 | def test_name_fixer(self): |
| 458 | for spec, renamed in [ |
nothing calls this directly
no test coverage detected