@@ -556,7 +556,9 @@ defmodule ExceptionTest do
556556 end
557557
558558 test "annotates function clause errors" do
559- assert blame_message ( Access , & & 1 . fetch ( :foo , :bar ) ) =~ """
559+ message = blame_message ( Access , & & 1 . fetch ( :foo , :bar ) )
560+
561+ assert message =~ """
560562 no function clause matching in Access.fetch/2
561563
562564 The following arguments were given to Access.fetch/2:
@@ -566,11 +568,15 @@ defmodule ExceptionTest do
566568
567569 # 2
568570 :bar
571+ """
569572
570- Attempted function clauses (showing 5 out of 5):
573+ if Access not in :cover . modules ( ) do
574+ assert message =~ """
575+ Attempted function clauses (showing 5 out of 5):
571576
572- def fetch(-%module{} = container-, key)
573- """
577+ def fetch(-%module{} = container-, key)
578+ """
579+ end
574580 end
575581
576582 test "annotates undefined function error with suggestions" do
@@ -863,10 +869,16 @@ defmodule ExceptionTest do
863869 { exception , stack } =
864870 Exception . blame ( :error , :function_clause , [ { Keyword , :pop , args , [ line: 13 ] } ] )
865871
866- assert % FunctionClauseError { kind: :def , args: ^ args , clauses: [ _ ] } = exception
872+ if Keyword in :cover . modules ( ) do
873+ assert % FunctionClauseError { kind: nil , args: ^ args , clauses: nil } = exception
874+ else
875+ assert % FunctionClauseError { kind: :def , args: ^ args , clauses: [ _ ] } = exception
876+ end
877+
867878 assert stack == [ { Keyword , :pop , 3 , [ line: 13 ] } ]
868879 end
869880
881+ @ tag :require_ast
870882 test "annotates args and clauses from mfa" do
871883 import PathHelpers
872884
0 commit comments