# test_something (tests.test_x.TestX.test_something) ... ok
# but the test body contains: assertEqual(1, 2) and never runs

- **ID:** `python/unittest-assertion-always-true-no-self`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A helper method named like a test (test_*) inside the TestCase lacks the `self` parameter or is defined as a staticmethod, so unittest treats it as a test but it fails silently or is skipped.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8 | active | — | — |
| 3.12 | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   class TestX(unittest.TestCase):
    def _build_payload(self):
        return {'k': 1}

    def test_payload(self):
        self.assertEqual(self._build_payload(), {'k': 1})
   ```
2. **** (90% success)
   ```
   def build_payload():
    return {'k': 1}

class TestX(unittest.TestCase):
    def test_payload(self):
        self.assertEqual(build_payload(), {'k': 1})
   ```

## Dead Ends

- **** — Renaming fixes discovery but does not explain why the assertions were silently skipped; other tests may still be misnamed. (40% fail)
- **** — Hides the real issue; the method is still collected as a test and reported as skipped, polluting results. (70% fail)
