From 025fb29aa7745927caa4635b43082f9ea0694703 Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Sun, 2 Nov 2025 12:10:22 +0300 Subject: [PATCH 1/3] fix: bad TestGlobalCache::sm_Dict --- tests/TestGlobalCache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/TestGlobalCache.py b/tests/TestGlobalCache.py index 7ea7e6d..56b374d 100644 --- a/tests/TestGlobalCache.py +++ b/tests/TestGlobalCache.py @@ -13,7 +13,7 @@ class TestGlobalCache: sm_Guard = threading.Lock() - sm_Dict: typing.Dict[str, any] = dict + sm_Dict: typing.Dict[str, any] = dict() # -------------------------------------------------------------------- def __init__(self): From 27a42ecef8230a010153b2a0727d48439f93ee1f Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Sun, 2 Nov 2025 12:11:55 +0300 Subject: [PATCH 2/3] TestGlobalCache is updated (new asserts) --- tests/TestGlobalCache.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/TestGlobalCache.py b/tests/TestGlobalCache.py index 56b374d..f879047 100644 --- a/tests/TestGlobalCache.py +++ b/tests/TestGlobalCache.py @@ -24,6 +24,7 @@ def GetOrCreateResource(globalResourceID: str, resourceFactory) -> any: assert resourceFactory is not None assert isinstance(globalResourceID, str) assert __class__.sm_Guard is not None + assert __class__.sm_Dict is not None assert isinstance(__class__.sm_Dict, dict) with __class__.sm_Guard: @@ -40,6 +41,7 @@ def GetOrCreateResource(globalResourceID: str, resourceFactory) -> any: # -------------------------------------------------------------------- def ReleaseAllResources(): assert __class__.sm_Guard is not None + assert __class__.sm_Dict is not None assert isinstance(__class__.sm_Dict, dict) with __class__.sm_Guard: From 08f98843da7bfab4ef28428b7cb213e5e5381588 Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Sun, 2 Nov 2025 12:14:09 +0300 Subject: [PATCH 3/3] TestGlobalCache is updated (exact debug checks) --- tests/TestGlobalCache.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/TestGlobalCache.py b/tests/TestGlobalCache.py index f879047..be3de1c 100644 --- a/tests/TestGlobalCache.py +++ b/tests/TestGlobalCache.py @@ -25,7 +25,7 @@ def GetOrCreateResource(globalResourceID: str, resourceFactory) -> any: assert isinstance(globalResourceID, str) assert __class__.sm_Guard is not None assert __class__.sm_Dict is not None - assert isinstance(__class__.sm_Dict, dict) + assert type(__class__.sm_Dict) == dict # noqa: E721 with __class__.sm_Guard: if globalResourceID in __class__.sm_Dict.keys(): @@ -42,7 +42,7 @@ def GetOrCreateResource(globalResourceID: str, resourceFactory) -> any: def ReleaseAllResources(): assert __class__.sm_Guard is not None assert __class__.sm_Dict is not None - assert isinstance(__class__.sm_Dict, dict) + assert type(__class__.sm_Dict) == dict # noqa: E721 with __class__.sm_Guard: emptyDict: typing.Dict[str, any] = dict()