diff --git a/CHANGELOG.md b/CHANGELOG.md index ecf44e46cbf6a00e600d3287fb3aeb363566e357..24139359bdb096251ed4dcb3a12b186510b4b6d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1,3 @@ # v2.17.14 + +* fixed a bug in `install_dump_memory_on` diff --git a/satella/__init__.py b/satella/__init__.py index 87840334bd82b1d900c497f7f2b2221ffeaaad70..6fbabca8ae5c1762d05dbd185a74c34f485af503 100644 --- a/satella/__init__.py +++ b/satella/__init__.py @@ -1 +1 @@ -__version__ = '2.17.14a1' +__version__ = '2.17.14' diff --git a/satella/instrumentation/memory/dump_frames_on.py b/satella/instrumentation/memory/dump_frames_on.py index 710119c0118c53a632a16f907f70837e70c2b03f..965f93ed9d5fca7d3543af8b32db80fdfa9876ba 100644 --- a/satella/instrumentation/memory/dump_frames_on.py +++ b/satella/instrumentation/memory/dump_frames_on.py @@ -51,4 +51,4 @@ def install_dump_memory_on(signal_number, output: tp.TextIO = sys.stderr): :param output: output """ signal.signal(signal_number, - lambda sig_no, stack_frame: dump_memory_on(sig_no, stack_frame, output)) + lambda sig_no, stack_frame: dump_memory_on(output)) diff --git a/tests/test_instrumentation/test_memory.py b/tests/test_instrumentation/test_memory.py index 44b3579776f897346b2362c826c047ebd721f55c..e5d0e5029444185aa164e26f8ae35f06d6a21a58 100644 --- a/tests/test_instrumentation/test_memory.py +++ b/tests/test_instrumentation/test_memory.py @@ -1,4 +1,9 @@ import logging +import os +import signal +import sys + +from satella.instrumentation import install_dump_frames_on from satella.instrumentation.memory import MemoryPressureManager, CustomCondition, All, Any, \ dump_memory_on import time @@ -17,6 +22,11 @@ class OnDemandCondition(CustomCondition): class TestMemory(unittest.TestCase): + @unittest.skipIf(sys.platform == 'win32', 'testable only on unices') + def test_install_dump_on(self): + install_dump_frames_on(signal.SIGUSR1) + os.kill(0, 10) + def test_dump_memory(self): dump_memory_on()