()
| 232 | |
| 233 | |
| 234 | def test_proxy_string_representations(): |
| 235 | class Example: |
| 236 | def __repr__(self): |
| 237 | return "a" |
| 238 | |
| 239 | def __bytes__(self): |
| 240 | return b"b" |
| 241 | |
| 242 | def __index__(self): |
| 243 | return 23 |
| 244 | |
| 245 | _, p = _make_proxy(Example()) |
| 246 | assert str(p) == "a" |
| 247 | assert repr(p) == "a" |
| 248 | assert bytes(p) == b"b" |
| 249 | # __index__ |
| 250 | assert bin(p) == "0b10111" |
| 251 | assert oct(p) == "0o27" |
| 252 | assert hex(p) == "0x17" |
| 253 | |
| 254 | |
| 255 | def test_proxy_hash(): |
nothing calls this directly
no test coverage detected