Skip to content

test: Remove pytest.mark.forked from some tests in tests_basics - #7917

Merged
ericapisani merged 4 commits into
major/3.0from
py-2637-clean-up-deprecation-warnigns
Oct 8, 2026
Merged

ericapisani merged 4 commits into
major/3.0from
py-2637-clean-up-deprecation-warnigns

Conversation

@ericapisani

@ericapisani ericapisani commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Group the TracingTestClass tracing tests into a class whose setup/teardown restores the static and class_ attributes that functions_to_trace patches.

Resolves warnings like these https://github.com/getsentry/sentry-python/actions/runs/37602693189/job/112730646420#step:6:3739

Refs PY-2637
Refs #6949

Replace process forking with in-process cleanup.

- Add a `restore_global_event_processors` fixture that restores
  `scope.global_event_processors` after tests that reset integrations,
  preventing duplicate processors (e.g. DedupeIntegration) from
  leaking between tests.
- Group the TracingTestClass tracing tests into a class whose
  setup/teardown restores the `static` and `class_` attributes that
  `functions_to_trace` patches.

Refs PY-2637
Refs #6949
@linear-code

linear-code Bot commented Oct 7, 2026

Copy link
Copy Markdown

PY-2637

@ericapisani
ericapisani marked this pull request as ready for review October 7, 2026 12:36
@ericapisani
ericapisani requested a review from a team as a code owner October 7, 2026 12:36
@ericapisani
ericapisani marked this pull request as draft October 7, 2026 12:38
@ericapisani
ericapisani marked this pull request as ready for review October 7, 2026 12:39
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Codecov Results 📊

✅ 55393 passed | ❌ 1 failed | ⏭️ 2727 skipped | Total: 58121 | Pass Rate: 95.31% | Execution Time: 151m 18s

✅ Patch coverage is 100.00%. Project has 2060 uncovered lines.
❌ Project coverage is 90.03%. Comparing base (0cc9b31) to head (73e37a9).

Coverage diff
@@            Coverage Diff             @@
##        master       #PR       +/-##
==========================================
- Coverage    90.37%    90.03%    -0.34%
==========================================
  Files          202       185       -17
  Lines        26552     20670     -5882
  Branches      9854      7114     -2740
==========================================
+ Hits         23995     18610     -5385
- Misses        2557      2060      -497
- Partials      1495      1214      -281

Generated by Codecov Action

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e27897b. Configure here.

Comment thread tests/test_basics.py Outdated
@ericapisani
ericapisani marked this pull request as draft October 7, 2026 12:49
the forked process for test_integrations.

Will try and tackle this separately.
@ericapisani ericapisani changed the title test: Remove pytest.mark.forked from test_basics tests test: Remove pytest.mark.forked from some tests in tests_basics Oct 7, 2026
@ericapisani
ericapisani marked this pull request as ready for review October 7, 2026 15:31
@ericapisani
ericapisani merged commit 1320b7f into major/3.0 Oct 8, 2026
145 of 147 checks passed
@ericapisani
ericapisani deleted the py-2637-clean-up-deprecation-warnigns branch October 8, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants