gleeunit icon indicating copy to clipboard operation
gleeunit copied to clipboard

Better formatting for eunit timeouts

Open Papipo opened this issue 6 months ago • 0 comments

Using gleam 1.11.1 and gleeunit 1.6.0 I got a timeout from eunit in an unexpected format:

gleeunit.main
An unexpected error occurred:

  [Id([1, 1, 7]), Reason(Timeout(dict.from_list([#(Stacktrace, [#(atom.create_from_string("tom@lexer"), Next, 2, [File(charlist.from_string("src/tom/lexer.gleam")), Line(25)]), #(atom.create_from_string("tom@lexer_test"), ToStringTest, 0, [File(charlist.from_string("test/tom/lexer_test.gleam")), Line(40)]), EunitTest(atom.create_from_string("-mf_wrapper/2-fun-0-"), 2, [File(charlist.from_string("eunit_test.erl")), Line(274)]), EunitTest(RunTestfun, 1, [File(charlist.from_string("eunit_test.erl")), Line(72)]), EunitProc(RunTest, 1, [File(charlist.from_string("eunit_proc.erl")), Line(544)]), EunitProc(WithTimeout, 3, [File(charlist.from_string("eunit_proc.erl")), Line(369)]), EunitProc(HandleTest, 2, [File(charlist.from_string("eunit_proc.erl")), Line(527)]), EunitProc(TestsInorder, 3, [File(charlist.from_string("eunit_proc.erl")), Line(469)])])]))), Desc(Undefined), Source(#(atom.create_from_string("tom@lexer_test"), ToStringTest, 0)), Line(0)]

gleeunit.main
An unexpected error occurred:

  [Id([1, 1]), Reason(Undefined), Desc("module 'tom@lexer_test'"), Spawn(Undefined), Order(Undefined)]

gleeunit.main
An unexpected error occurred:

  [Id([1]), Reason(Undefined), Desc(Undefined), Spawn(Undefined), Order(Undefined)]

gleeunit.main
An unexpected error occurred:

  [Id([]), Reason(Blame([1, 1, 7])), Desc(Undefined), Spawn(Undefined), Order(Undefined)]

6 tests, 4 failures

Papipo avatar Jul 23 '25 15:07 Papipo