Issue #443: calling copied methods fails in Python 3
()
| 91 | |
| 92 | |
| 93 | def test_copy_method(): |
| 94 | """Issue #443: calling copied methods fails in Python 3""" |
| 95 | |
| 96 | m.ExampleMandA.add2c = m.ExampleMandA.add2 |
| 97 | m.ExampleMandA.add2d = m.ExampleMandA.add2b |
| 98 | a = m.ExampleMandA(123) |
| 99 | assert a.value == 123 |
| 100 | a.add2(m.ExampleMandA(-100)) |
| 101 | assert a.value == 23 |
| 102 | a.add2b(m.ExampleMandA(20)) |
| 103 | assert a.value == 43 |
| 104 | a.add2c(m.ExampleMandA(6)) |
| 105 | assert a.value == 49 |
| 106 | a.add2d(m.ExampleMandA(-7)) |
| 107 | assert a.value == 42 |
| 108 | |
| 109 | |
| 110 | def test_properties(): |
nothing calls this directly
no test coverage detected