Thread (6 messages) flat view 6 messages, 3 authors, 2016-06-15

Re: How to re-use setups in multiple tests?

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:37

Hi,

On Mon, 1 Oct 2007, Tom Clarke wrote:
I'm wondering if there's a pattern for re-using setups across several 
tests, similar to how a setUp function is used in xUnit. The problem is 
I need the setup to actually be re-run, for each test to start from a 
clean slate, so using the following doesn't work as the setup is just 
run before the first test.
We typically do the clean up phase explicitely.  Or avoid it.

Example: you want to do something to a branch, but the next step should 
use the original state of the branch.

Solution: "git checkout -b new-branch HEAD~5"

Sorry, unless you are a little less mysterious about the exact use case 
you have in mind, I cannot help more.

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help