# PytestUnraisableExceptionWarning: Exception ignored in: <function ...>

- **ID:** `python/pytest-warnings-summary`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

An exception was raised in a context where it cannot be propagated, such as in a __del__ method or during garbage collection.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   Run pytest with -W error::pytest.PytestUnraisableExceptionWarning to turn the warning into an error and get a traceback.
   ```
2. **** (85% success)
   ```
   Replace __del__ with explicit close() methods and use contextlib.closing or context managers to guarantee cleanup.
   ```

## Dead Ends

- **** — This hides the underlying issue, which may cause resource leaks or incorrect behavior. (80% fail)
- **** — This suppresses all warnings, potentially hiding other important issues. (90% fail)
