Merge pull request #3335 from SSPkrolik/teardown-move
Moved teardown call to try block for namespace access reasons
This commit is contained in:
commit
ee93ee5e15
1 changed files with 2 additions and 1 deletions
|
|
@ -150,6 +150,8 @@ template test*(name: expr, body: stmt): stmt {.immediate, dirty.} =
|
|||
try:
|
||||
when declared(testSetupIMPLFlag): testSetupIMPL()
|
||||
body
|
||||
when declared(testTeardownIMPLFlag):
|
||||
defer: testTeardownIMPL()
|
||||
|
||||
except:
|
||||
when not defined(js):
|
||||
|
|
@ -158,7 +160,6 @@ template test*(name: expr, body: stmt): stmt {.immediate, dirty.} =
|
|||
fail()
|
||||
|
||||
finally:
|
||||
when declared(testTeardownIMPLFlag): testTeardownIMPL()
|
||||
testDone name, testStatusIMPL
|
||||
|
||||
proc checkpoint*(msg: string) =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue