#2778: implicit casting from None to object (not pointer)
()
| 487 | |
| 488 | |
| 489 | def test_casts_none(): |
| 490 | """#2778: implicit casting from None to object (not pointer)""" |
| 491 | a = m.NoneCastTester() |
| 492 | assert m.ok_obj_or_none(a) == -1 |
| 493 | a = m.NoneCastTester(4) |
| 494 | assert m.ok_obj_or_none(a) == 4 |
| 495 | a = m.NoneCastTester(None) |
| 496 | assert m.ok_obj_or_none(a) == -1 |
| 497 | assert m.ok_obj_or_none(None) == -1 |
| 498 | |
| 499 | |
| 500 | def test_str_issue(msg): |
nothing calls this directly
no test coverage detected