Change logfire_pytest fixture scope to session#1758
Merged
jirikuncar merged 1 commit intomainfrom Mar 8, 2026
Merged
Conversation
Deploying logfire-docs with
|
| Latest commit: |
9d88b91
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1257d013.logfire-docs.pages.dev |
| Branch Preview URL: | https://pytest-scope-fixture.logfire-docs.pages.dev |
9a2d574 to
a8e66c0
Compare
logfire_pytest fixture to session scope and fix span hierarchylogfire_pytest fixture to session scope
The logfire_pytest fixture only returns a configured Logfire instance and doesn't need per-test isolation. Making it session-scoped avoids unnecessary re-creation and allows it to be used by fixtures of any scope.
bcb1c14 to
9d88b91
Compare
logfire_pytest fixture to session scopelogfire_pytest fixture scope to session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
logfire_pytestfixture is changed from function to session scope since it provides a Logfire instance configured for the plugin which doesn't need to be recreated per test.