File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
aws-opentelemetry-distro/tests/amazon/opentelemetry/distro/patches Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 11# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22# SPDX-License-Identifier: Apache-2.0
33import os
4+ import sys
45from importlib .metadata import PackageNotFoundError
56from unittest import TestCase
67from unittest .mock import MagicMock , patch
78
9+ # Create a mock gevent module that can be imported
10+ # This allows tests to run without gevent installed
11+ _mock_gevent = MagicMock ()
12+ _mock_gevent .monkey = MagicMock ()
13+ sys .modules ['gevent' ] = _mock_gevent
14+ sys .modules ['gevent.monkey' ] = _mock_gevent .monkey
15+
816from amazon .opentelemetry .distro .patches ._gevent_patches import (
917 AWS_GEVENT_PATCH_MODULES ,
1018 _is_gevent_installed ,
Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ commands_pre =
3434; Install common packages for all the tests. These are not needed in all the
3535; cases but it saves a lot of boilerplate in this file.
3636 test: pip install botocore
37- test: pip install gevent
3837 test: pip install opentelemetry-api[test]@{env:CORE_REPO}\# egg=opentelemetry-api&subdirectory=opentelemetry-api
3938 test: pip install opentelemetry-sdk[test]@{env:CORE_REPO}\# egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk
4039 test: pip install opentelemetry-instrumentation[test]@{env:CONTRIB_REPO}\# egg=opentelemetry-instrumentation&subdirectory=opentelemetry-instrumentation
You can’t perform that action at this time.
0 commit comments