Test mixing sync and async client calls in the same async context.
()
| 630 | |
| 631 | @pytest.mark.asyncio |
| 632 | async def test_mixed_sync_async_calls(): |
| 633 | """Test mixing sync and async client calls in the same async context.""" |
| 634 | sync_client = DstackClient() |
| 635 | async_client = AsyncDstackClient() |
| 636 | |
| 637 | # Call sync client from async context |
| 638 | sync_result = sync_client.get_key() |
| 639 | assert isinstance(sync_result, GetKeyResponse) |
| 640 | |
| 641 | # Call async client normally |
| 642 | async_result = await async_client.get_key() |
| 643 | assert isinstance(async_result, GetKeyResponse) |
| 644 | |
| 645 | # Both should work and return valid results |
| 646 | assert len(sync_result.decode_key()) == 32 |
| 647 | assert len(async_result.decode_key()) == 32 |
nothing calls this directly
no test coverage detected