Test that AsyncTappdClient shows deprecation warning.
()
| 511 | |
| 512 | # Test AsyncTappdClient |
| 513 | def test_async_tappd_client_deprecated(): |
| 514 | """Test that AsyncTappdClient shows deprecation warning.""" |
| 515 | with warnings.catch_warnings(record=True) as w: |
| 516 | warnings.simplefilter("always") |
| 517 | AsyncTappdClient() |
| 518 | |
| 519 | # Filter for AsyncTappdClient deprecation warnings specifically |
| 520 | tappd_warnings = [ |
| 521 | warning |
| 522 | for warning in w |
| 523 | if issubclass(warning.category, DeprecationWarning) |
| 524 | and "AsyncTappdClient is deprecated" in str(warning.message) |
| 525 | ] |
| 526 | |
| 527 | assert len(tappd_warnings) == 1 |
| 528 | assert "AsyncTappdClient is deprecated" in str(tappd_warnings[0].message) |
| 529 | |
| 530 | |
| 531 | @pytest.mark.asyncio |
nothing calls this directly
no test coverage detected