(obj: object)
| 353 | |
| 354 | |
| 355 | def good_repr(obj: object) -> str: |
| 356 | if isinstance(obj, str): |
| 357 | if obj.count("\n") > 1: |
| 358 | bits = ["'''\\"] |
| 359 | for line in obj.split("\n"): |
| 360 | # force repr to use ' not ", then cut it off |
| 361 | bits.append(repr('"' + line)[2:-1]) |
| 362 | bits[-1] += "'''" |
| 363 | return "\n".join(bits) |
| 364 | return repr(obj) |
| 365 | |
| 366 | |
| 367 | def assert_equal(a: object, b: object, fmt: str = "{} != {}") -> None: |
no test coverage detected
searching dependent graphs…