(msg)
| 38 | |
| 39 | |
| 40 | def test_instance(msg): |
| 41 | with pytest.raises(TypeError) as excinfo: |
| 42 | m.NoConstructor() |
| 43 | assert msg(excinfo.value) == "m.class_.NoConstructor: No constructor defined!" |
| 44 | |
| 45 | instance = m.NoConstructor.new_instance() |
| 46 | |
| 47 | if env.GRAALPY: |
| 48 | pytest.skip("ConstructorStats is incompatible with GraalPy.") |
| 49 | |
| 50 | cstats = ConstructorStats.get(m.NoConstructor) |
| 51 | assert cstats.alive() == 1 |
| 52 | del instance |
| 53 | assert cstats.alive() == 0 |
| 54 | |
| 55 | |
| 56 | @pytest.mark.skipif( |
nothing calls this directly
no test coverage detected