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