diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2019-08-08 14:33:03 -0500 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2019-08-19 13:13:36 -0500 |
commit | c091779f63521e13d9f7af4ff113dde8cc5f6a7f (patch) | |
tree | ce1e29da778995b4467064d278a6a58a946e11ee /numpy/f2py/tests/test_compile_function.py | |
parent | 684bee2ae868c1bd8cb4fd4066d447ca35bd848e (diff) | |
download | numpy-c091779f63521e13d9f7af4ff113dde8cc5f6a7f.tar.gz |
BUG: Further, followup f2py reference count fixes
Note that the extension module dict seems to be never dereferenced
(there is an additional reference to it kept around somewhere).
This reference seems to part of the C python module loading
(possibly intentionally), and I could not find how to remove it or
where it originates from.
Diffstat (limited to 'numpy/f2py/tests/test_compile_function.py')
-rw-r--r-- | numpy/f2py/tests/test_compile_function.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/f2py/tests/test_compile_function.py b/numpy/f2py/tests/test_compile_function.py index 36abf05f9..40ea7997f 100644 --- a/numpy/f2py/tests/test_compile_function.py +++ b/numpy/f2py/tests/test_compile_function.py @@ -29,6 +29,7 @@ def setup_module(): @pytest.mark.parametrize( "extra_args", [['--noopt', '--debug'], '--noopt --debug', ''] ) +@pytest.mark.leaks_references(reason="Imported module seems never deleted.") def test_f2py_init_compile(extra_args): # flush through the f2py __init__ compile() function code path as a # crude test for input handling following migration from @@ -81,6 +82,9 @@ def test_f2py_init_compile(extra_args): return_check = import_module(modname) calc_result = return_check.foo() assert_equal(calc_result, 15) + # Removal from sys.modules, is not as such necessary. Even with + # removal, the module (dict) stays alive. + del sys.modules[modname] def test_f2py_init_compile_failure(): |