# AssertionError: assert 0 == 1
 +  where 0 = len(shared_list)

- **ID:** `python/pytest-flaky-test-order-dependency`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The test depends on state modified by another test, and the order of execution changed or tests are run in parallel.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   @pytest.fixture(autouse=True)
def reset_shared_list():
    shared_list.clear()
    yield
   ```
2. **** (90% success)
   ```
   Replace global variables with fixtures that provide fresh instances per test.
   ```

## Dead Ends

- **** — This is fragile and does not fix the underlying state leakage; tests may still fail in isolation. (70% fail)
- **** — This is unreliable and slows down tests. (90% fail)
