debugging test

This commit is contained in:
David Murphy 2025-03-03 15:27:14 -07:00 committed by Daniel Wozniak
parent 61392d0459
commit 41fb26f49d

View file

@ -560,7 +560,8 @@ def test_caller(schema, react_wrap):
)
@pytest.mark.parametrize("file_client", ["runner", "wheel", "local", "caller"])
## DGM @pytest.mark.parametrize("file_client", ["runner", "wheel", "local", "caller"])
@pytest.mark.parametrize("file_client", ["runner"])
def test_client_cache_missing_key(file_client, react_wrap):
"""
Test client_cache file_client missing, gets repopulated
@ -575,14 +576,26 @@ def test_client_cache_missing_key(file_client, react_wrap):
thread_pool = Mock()
thread_pool.fire_async = Mock()
with patch.object(react_wrap, "client_cache", client_cache):
print(
f"DGM test_client_cache_missing_key patch client_cache, file_client '{file_client}', react_wrap.client_cache '{react_wrap.client_cache}'",
flush=True,
)
with patch.object(react_wrap, "pool", thread_pool):
react_wrap.run(chunk)
print(
f"DGM test_client_cache_missing_key patch pool, file_client '{file_client}', react_wrap.client_cache '{react_wrap.client_cache}'",
flush=True,
)
del react_wrap.client_cache[f"{file_client}"]
print(
f"DGM test_client_cache_missing_key post del key, file_client '{file_client}', react_wrap.client_cache '{react_wrap.client_cache}'",
flush=True,
)
thread_pool.fire_async.assert_called_with(
react_wrap.client_cache[file_client].low,
args=WRAPPER_CALLS[tag],
)
## DGM client_cache[file_client].cmd.assert_called_with(
## DGM *WRAPPER_CALLS[tag]["args"], **WRAPPER_CALLS[tag]["kwargs"]
## DGM )
client_cache[file_client].cmd.assert_called_with(
*WRAPPER_CALLS[tag]["args"], **WRAPPER_CALLS[tag]["kwargs"]
)