(self)
| 43 | eq_(keyed_tuple[1], 2) |
| 44 | |
| 45 | def test_creation(self): |
| 46 | keyed_tuple = self._fixture([1, 2], ["a", "b"]) |
| 47 | eq_(str(keyed_tuple), "(1, 2)") |
| 48 | eq_(list(keyed_tuple._mapping.keys()), ["a", "b"]) |
| 49 | eq_(keyed_tuple._fields, ("a", "b")) |
| 50 | eq_(keyed_tuple._asdict(), {"a": 1, "b": 2}) |
| 51 | |
| 52 | def test_index_access(self): |
| 53 | keyed_tuple = self._fixture([1, 2], ["a", "b"]) |