# TypeError: 'function' object is not callable

- **ID:** `python/pytest-capture-using-fixture-as-function`
- **Domain:** python
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

在pytest测试中，将fixture名称错误地用作函数调用，而实际上fixture是一个可调用对象，但可能被覆盖或误用。

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.7 | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   def test_example(my_fixture):
    assert my_fixture == expected
   ```
2. **** (90% success)
   ```
   确保没有定义与fixture同名的函数，例如：def my_fixture(): pass 会覆盖fixture
   ```

## Dead Ends

- **** — 删除fixture会导致其他测试无法使用，且根本原因未解决。 (80% fail)
- **** — lambda不会改变fixture的本质，调用仍会失败。 (90% fail)
