<div dir="ltr">There's no reason a finally block inside each test method wouldn't work, and that's probably the simplest solution.</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 15, 2016 at 12:59 AM Pavel Labath <<a href="mailto:labath@google.com">labath@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 14 January 2016 at 21:52, Zachary Turner via lldb-dev<br>
<<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:<br>
> So what if tests could be *either* a method *or* a nested class. If it's a<br>
> nested class, it could provide setUp, tearDown, and run methods. These<br>
> setup and teardown methods can do whatever they want specific to the<br>
> individual test, and it also provides the exception safe way to clean up.<br>
<br>
I don't think this is supported by unittest, which is what determines<br>
what constitutes a "test". Nothing that couldn't be hacked around, but<br>
I don't see the added value over just using a finally block.<br>
<br>
Was there any reason we couldn't use that? I don't think it prevents<br>
code reuse, and it's a standard way of doing things that everyone<br>
should be familiar with.<br>
<br>
pl<br>
</blockquote></div>