# pytest.skip: Skipped: condition not met

- **ID:** `python/pytest-skip-vs-xfail-confusion`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A test was skipped using pytest.skip() when the developer intended to mark it as expected to fail (xfail). The test is not run, but the failure is not tracked.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 7.x | active | — | — |
| 8.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   @pytest.mark.xfail(reason='Known bug #123')
def test_broken():
    assert False
   ```
2. **** (90% success)
   ```
   def test_conditional():
    if not feature_enabled():
        pytest.xfail('Feature not enabled')
    assert feature_works()
   ```

## Dead Ends

- **** — pytest.xfail immediately fails the test, which is not the same as marking it as expected to fail. The test will be reported as failed. (80% fail)
- **** — Comments do not change test behavior. The test remains skipped and the expected failure is not tracked. (95% fail)
