(first, second, prefix)
| 431 | |
| 432 | |
| 433 | def assert_equal(first, second, prefix): |
| 434 | # A better assert equals. It allows you to just provide |
| 435 | # prefix instead of the entire message. |
| 436 | try: |
| 437 | assert first == second |
| 438 | except Exception: |
| 439 | try: |
| 440 | better = f"{prefix} (actual != expected)\n{json.dumps(first, indent=2)} !=\n{json.dumps(second, indent=2)}" |
| 441 | except (ValueError, TypeError): |
| 442 | better = f"{prefix} (actual != expected)\n{first} !=\n{second}" |
| 443 | raise AssertionError(better) |
| 444 | |
| 445 | |
| 446 | def _serialize_request_description(request_dict): |
no outgoing calls
no test coverage detected