#283: __str__ called on uninitialized instance when constructor arguments invalid
(msg)
| 498 | |
| 499 | |
| 500 | def test_str_issue(msg): |
| 501 | """#283: __str__ called on uninitialized instance when constructor arguments invalid""" |
| 502 | |
| 503 | assert str(m.StrIssue(3)) == "StrIssue[3]" |
| 504 | |
| 505 | with pytest.raises(TypeError) as excinfo: |
| 506 | str(m.StrIssue("no", "such", "constructor")) |
| 507 | assert ( |
| 508 | msg(excinfo.value) |
| 509 | == """ |
| 510 | __init__(): incompatible constructor arguments. The following argument types are supported: |
| 511 | 1. m.methods_and_attributes.StrIssue(arg0: typing.SupportsInt | typing.SupportsIndex) |
| 512 | 2. m.methods_and_attributes.StrIssue() |
| 513 | |
| 514 | Invoked with: 'no', 'such', 'constructor' |
| 515 | """ |
| 516 | ) |
| 517 | |
| 518 | |
| 519 | def test_unregistered_base_implementations(): |