()
| 3190 | |
| 3191 | @pytest.mark.skipif(not HAS_REFCOUNT, reason="Python lacks refcounts") |
| 3192 | def test_warn_noclose(): |
| 3193 | a = np.arange(6, dtype='f4') |
| 3194 | au = a.byteswap().newbyteorder() |
| 3195 | with suppress_warnings() as sup: |
| 3196 | sup.record(RuntimeWarning) |
| 3197 | it = np.nditer(au, [], [['readwrite', 'updateifcopy']], |
| 3198 | casting='equiv', op_dtypes=[np.dtype('f4')]) |
| 3199 | del it |
| 3200 | assert len(sup.log) == 1 |
| 3201 | |
| 3202 | |
| 3203 | @pytest.mark.skipif(sys.version_info[:2] == (3, 9) and sys.platform == "win32", |
nothing calls this directly
no test coverage detected