Skip to content

Commit 18bf400

Browse files
remove forked and break test into own environment
1 parent 535991e commit 18bf400

File tree

8 files changed

+149
-116
lines changed

8 files changed

+149
-116
lines changed

.github/workflows/test-integrations-misc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ jobs:
8282
run: |
8383
set -x # print commands that are executed
8484
./scripts/runtox.sh "py${{ matrix.python-version }}-integration_deactivation"
85+
- name: Test shadowed_module
86+
run: |
87+
set -x # print commands that are executed
88+
./scripts/runtox.sh "py${{ matrix.python-version }}-shadowed_module"
8589
- name: Generate coverage XML (Python 3.6)
8690
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
8791
run: |

scripts/populate_tox/package_dependencies.jsonl

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

scripts/populate_tox/populate_tox.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"cloud_resource_context",
6666
"common",
6767
"integration_deactivation",
68+
"shadowed_module",
6869
"gcp",
6970
"gevent",
7071
"opentelemetry",

scripts/populate_tox/releases.jsonl

Lines changed: 14 additions & 14 deletions
Large diffs are not rendered by default.

scripts/populate_tox/tox.jinja

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ envlist =
2626
# === Integration Deactivation ===
2727
{py3.9,py3.10,py3.11,py3.12,py3.13,py3.14}-integration_deactivation
2828

29+
# === Shadowed Module ===
30+
{py3.7,py3.8,py3.9,py3.10,py3.11,py3.12,py3.13,py3.14,py3.14t}-shadowed_module
31+
2932
# === Integrations ===
3033

3134
# Asgi
@@ -157,10 +160,15 @@ setenv =
157160
django: DJANGO_SETTINGS_MODULE=tests.integrations.django.myapp.settings
158161
spark-v{3.0.3,3.5.6}: JAVA_HOME=/usr/lib/jvm/temurin-11-jdk-amd64
159162
163+
# Avoid polluting test suite with imports
164+
common: PYTEST_ADDOPTS="--ignore tests/test_shadowed_module.py"
165+
gevent: PYTEST_ADDOPTS="--ignore tests/test_shadowed_module.py"
166+
160167
# TESTPATH definitions for test suites not managed by toxgen
161168
common: TESTPATH=tests
162169
gevent: TESTPATH=tests
163170
integration_deactivation: TESTPATH=tests/test_ai_integration_deactivation.py
171+
shadowed_module: TESTPATH=tests/test_shadowed_module.py
164172
asgi: TESTPATH=tests/integrations/asgi
165173
aws_lambda: TESTPATH=tests/integrations/aws_lambda
166174
cloud_resource_context: TESTPATH=tests/integrations/cloud_resource_context

scripts/split_tox_gh_actions/split_tox_gh_actions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@
163163
"trytond",
164164
"typer",
165165
"integration_deactivation",
166+
"shadowed_module",
166167
],
167168
}
168169

tests/test_shadowed_module.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ def find_unrecognized_dependencies(tree):
7979
@pytest.mark.skipif(
8080
sys.version_info < (3, 7), reason="asyncpg imports __future__.annotations"
8181
)
82-
@pytest.mark.forked # Importing modules can cause side-effects
8382
def test_shadowed_modules_when_importing_integrations(
8483
sentry_init, integration_submodule_name
8584
):

0 commit comments

Comments
 (0)