[Lldb-commits] [PATCH] D14406: Don't depend on implementation details of unittest2 for our custom decorators

Tamas Berghammer via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 5 18:00:51 PST 2015


tberghammer added inline comments.

================
Comment at: packages/Python/lldbsuite/test/lldbtest.py:605
@@ -611,2 +604,3 @@
             if expected_fn(self):
-                raise case._UnexpectedSuccess(sys.exc_info(), bugnumber)
+                xfail_func = unittest2.expectedFailure(func)
+                xfail_func(*args, **kwargs)
----------------
You are swallowing the bug number here

Based on the implementation of unittest2.expectedFailure I think you should write the following to preserve it (I haven't tested it):

```
unittest2.expectedFailure(bugnumber)(func)
```


http://reviews.llvm.org/D14406





More information about the lldb-commits mailing list