(self)
| 634 | class TestMemEventHook(_DeprecationTestCase): |
| 635 | # Deprecated 2021-11-18, NumPy 1.23 |
| 636 | def test_mem_seteventhook(self): |
| 637 | # The actual tests are within the C code in |
| 638 | # multiarray/_multiarray_tests.c.src |
| 639 | import numpy.core._multiarray_tests as ma_tests |
| 640 | with pytest.warns(DeprecationWarning, |
| 641 | match='PyDataMem_SetEventHook is deprecated'): |
| 642 | ma_tests.test_pydatamem_seteventhook_start() |
| 643 | # force an allocation and free of a numpy array |
| 644 | # needs to be larger then limit of small memory cacher in ctors.c |
| 645 | a = np.zeros(1000) |
| 646 | del a |
| 647 | break_cycles() |
| 648 | with pytest.warns(DeprecationWarning, |
| 649 | match='PyDataMem_SetEventHook is deprecated'): |
| 650 | ma_tests.test_pydatamem_seteventhook_end() |
| 651 | |
| 652 | |
| 653 | class TestArrayFinalizeNone(_DeprecationTestCase): |
nothing calls this directly
no test coverage detected