Re: [PATCH] tests: fix autostash
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jun 8, 2013, 16:56 UTC
- Message-ID
- <20130608165611.GB3109@elie.Belkin>
- In-Reply-To
- <CALkWK0=qVXL=DtJzYRGFLQQh3_-cGC_t_zpaiTL9KVKN4--mVg@mail.gmail.com>
Ramkumar Ramachandra wrote:
> How else am I supposed to write them? If there is a stale state from > the previous test, there isn't too much I can do. Or should I be > cleaning up state at the beginning of each test, instead of at the > end?
That's one strategy. "test_when_finished" to restore the set-up state is another.
Making tests skippable unless labelled otherwise is currently an aspirational goal rather than a practical one. Hopefully some day we'll get there and the test harness can start checking it. :) It makes reorganizing test scripts, for example by reordering tests, much easier.
Thanks, Jonathan