[Lldb-commits] [lldb] [lldb][test] Remove `reason` from `unittest2.expectedFailure` usage (PR #73028)

Jordan Rupprecht via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 21 11:50:49 PST 2023


rupprecht wrote:

This cleanup isn't strictly required to proceed w/ unittest2->unittest; we already have a wrapper in decorators.py that we could update, from:

```py
def expectedFailure(func):
    return unittest2.expectedFailure(func)
```

To:
```py
def expectedFailure(func):
    if callable(func):
        return unittest.expectedFailure(func)
    return unittest.expectedFailure
```

IMHO, better to just start dropping the reason field to be more uniform; one should not have to decipher whether `@expectedFailure` is referring to the version in `unittest` or `decorators`.

https://github.com/llvm/llvm-project/pull/73028


More information about the lldb-commits mailing list