Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ filterwarnings =
ignore::DeprecationWarning:pkg_resources.*
ignore::DeprecationWarning:setuptools.*
ignore::PendingDeprecationWarning
ignore:The bot client is deprecated and will be removed in a future release\.:DeprecationWarning
# pytest-asyncio warnings that are safe to ignore
ignore:.*deprecated.*asyncio.*:DeprecationWarning:pytest_asyncio.*

Expand Down
13 changes: 10 additions & 3 deletions tests/hosting_teams/test_teams_agent_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,28 @@

import re
import sys
from importlib.util import find_spec
import pytest
from unittest.mock import AsyncMock, MagicMock, patch

is_supported_version = sys.version_info >= (3, 12)
is_teams_installed = (
is_supported_version and find_spec("microsoft_agents.hosting.teams") is not None
)

pytestmark = pytest.mark.skipif(
not is_supported_version,
reason="microsoft-agents-hosting-teams tests require Python 3.12+",
not is_teams_installed,
reason=(
"microsoft-agents-hosting-teams tests require Python 3.12+ and the "
"microsoft-agents-hosting-teams package"
),
)

from microsoft_agents.activity import Activity, ActivityTypes
from microsoft_agents.hosting.core import TurnContext
from microsoft_agents.hosting.core.app import AgentApplication, RouteRank

if is_supported_version:
if is_teams_installed:
from microsoft_agents.activity.teams import (
MeetingParticipantsEventDetails,
ReadReceiptInfo,
Expand Down
Loading