Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip legacy entry_point tests on Python 3.13+ #679

Merged
merged 1 commit into from
Nov 28, 2024
Merged
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
22 changes: 15 additions & 7 deletions test/test_entry_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,29 @@
# Licensed under the Apache License, Version 2.0

import os
import sys
from unittest.mock import Mock
from unittest.mock import patch
import warnings

import pytest

with warnings.catch_warnings():
warnings.filterwarnings(
'ignore', message='.*entry_point.*deprecated.*', category=UserWarning)

from colcon_core.entry_point import EXTENSION_POINT_GROUP_NAME
from colcon_core.entry_point import get_all_entry_points
from colcon_core.entry_point import get_entry_points
from colcon_core.entry_point import load_entry_point
from colcon_core.entry_point import load_entry_points

import pytest
try:
from colcon_core.entry_point import EXTENSION_POINT_GROUP_NAME
from colcon_core.entry_point import get_all_entry_points
from colcon_core.entry_point import get_entry_points
from colcon_core.entry_point import load_entry_point
from colcon_core.entry_point import load_entry_points
except ModuleNotFoundError:
if sys.version_info >= (3, 13):
pytest.skip(
'pkg_resources is no longer available in Python 3.13+',
allow_module_level=True)
raise

from .environment_context import EnvironmentContext

Expand Down
Loading