From 72d56b1c80c569751a269a0c7e9f6b2815251487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl> Date: Tue, 5 Mar 2024 16:47:00 +0100 Subject: [PATCH] improve code coverage --- tests/test_instrumentation/test_memory.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_instrumentation/test_memory.py b/tests/test_instrumentation/test_memory.py index f07b8a99..56198130 100644 --- a/tests/test_instrumentation/test_memory.py +++ b/tests/test_instrumentation/test_memory.py @@ -23,6 +23,16 @@ class OnDemandCondition(CustomCondition): class TestMemory(unittest.TestCase): + def test_get_size_dict(self): + a = {'aba': 'aba'} + + class Aba: + def __init__(self): + self.aba = 'aba' + + self.assertGreater(get_size(a), 6) + self.assertGreater(get_size(Aba()), 6) + @unittest.skipIf(sys.platform == 'win32', 'testable only on unices') def test_install_dump_on(self): install_dump_frames_on(signal.SIGUSR1) -- GitLab