Test that resetting doesn't cause errors in __del__ methods. In [2]: class A(object): ...: def __del__(self): ...: print(str("Hi")) ...: In [3]: a = A() In [4]: get_ipython().reset() Hi In [5]: 1+1 Out[5]: 2
()
| 144 | |
| 145 | |
| 146 | def doctest_reset_del(): |
| 147 | """Test that resetting doesn't cause errors in __del__ methods. |
| 148 | |
| 149 | In [2]: class A(object): |
| 150 | ...: def __del__(self): |
| 151 | ...: print(str("Hi")) |
| 152 | ...: |
| 153 | |
| 154 | In [3]: a = A() |
| 155 | |
| 156 | In [4]: get_ipython().reset() |
| 157 | Hi |
| 158 | |
| 159 | In [5]: 1+1 |
| 160 | Out[5]: 2 |
| 161 | """ |
| 162 | |
| 163 | # For some tests, it will be handy to organize them in a class with a common |
| 164 | # setup that makes a temp file |
nothing calls this directly
no outgoing calls
no test coverage detected