Skip to content

I'd like to register the same set of tests a few times, with a different before hook #3366

Answered by novemberborn
mbork asked this question in Q&A
Discussion options

You must be logged in to vote

Taking the setup out of the test run altogether may be the approach that's easiest to understand and maintain.

You could also create your tests in a helper file (e.g. _ prefix) and import it from several actual test files. IIRC you don't need to call test.before() before you declare the tests.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mbork
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants