Skip to content

Commit 970b616

Browse files
smoothdeveloperdsyme
authored andcommitted
When InitializeSuiteAttribute.BeforeTest fails, the output of test runners is too obscure to help one to troubleshoot the issue. (#5001)
Provide explicit pointer to the place to look at / debug
1 parent d0d5da1 commit 970b616

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/fsharp/test-framework.fs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,11 @@ type public InitializeSuiteAttribute () =
272272
inherit TestActionAttribute()
273273

274274
override x.BeforeTest details =
275-
if details.IsSuite
276-
then suiteHelpers.Force() |> ignore
277-
275+
try
276+
if details.IsSuite
277+
then suiteHelpers.Force() |> ignore
278+
with
279+
| e -> raise (Exception("failed test suite initialization, debug code in InitializeSuiteAttribute", e))
278280
override x.AfterTest _details =
279281
()
280282

0 commit comments

Comments
 (0)