Skip to content

Commit

Permalink
Update logfire__all__ test
Browse files Browse the repository at this point in the history
  • Loading branch information
dmontagu committed Jan 29, 2025
1 parent 362deb5 commit 57f2093
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions logfire-api/logfire_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ def loguru_handler() -> dict[str, Any]: ...
def no_auto_trace(x):
return x

def add_non_user_code_prefix(*args, **kwargs) -> None: ...

@contextmanager
def suppress_instrumentation():
yield
Expand Down
4 changes: 4 additions & 0 deletions tests/test_logfire_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ def test_runtime(logfire_api_factory: Callable[[], ModuleType], module_name: str
logfire_api.no_auto_trace(lambda: None) # pragma: no branch
logfire__all__.remove('no_auto_trace')

assert hasattr(logfire_api, 'add_non_user_code_prefix')
logfire_api.add_non_user_code_prefix('.')
logfire__all__.remove('add_non_user_code_prefix')

assert hasattr(logfire_api, 'suppress_instrumentation')
with logfire_api.suppress_instrumentation():
...
Expand Down

0 comments on commit 57f2093

Please sign in to comment.