@@ -86,7 +86,9 @@ defmodule ExUnit.FormatterTest do
86
86
87
87
failure = [ { :exit , { { error , stack } , { :mod , :fun , [ ] } } , [ ] } ]
88
88
89
- assert trim_multiline_whitespace ( format_test_failure ( test ( ) , failure , 1 , 80 , & formatter / 2 ) ) =~
89
+ format = trim_multiline_whitespace ( format_test_failure ( test ( ) , failure , 1 , 80 , & formatter / 2 ) )
90
+
91
+ assert format =~
90
92
"""
91
93
1) world (Hello)
92
94
test/ex_unit/formatter_test.exs:1
@@ -101,11 +103,16 @@ defmodule ExUnit.FormatterTest do
101
103
102
104
# 2
103
105
:bar
106
+ """
104
107
105
- Attempted function clauses (showing 5 out of 5):
108
+ if Access not in :cover . modules ( ) do
109
+ assert format =~
110
+ """
111
+ Attempted function clauses (showing 5 out of 5):
106
112
107
- def fetch(%module{} = container, key)
108
- """
113
+ def fetch(%module{} = container, key)
114
+ """
115
+ end
109
116
end
110
117
111
118
test "formats test exits with assertion mfa" do
@@ -177,11 +184,16 @@ defmodule ExUnit.FormatterTest do
177
184
178
185
# 2
179
186
:bar
187
+ """
180
188
181
- Attempted function clauses (showing 5 out of 5):
189
+ if Access not in :cover . modules ( ) do
190
+ assert format =~
191
+ """
192
+ Attempted function clauses (showing 5 out of 5):
182
193
183
- def fetch(%module{} = container, key)
184
- """
194
+ def fetch(%module{} = container, key)
195
+ """
196
+ end
185
197
186
198
assert format =~ ~r" lib/access.ex:\d +: Access.fetch/2"
187
199
end
@@ -418,11 +430,16 @@ defmodule ExUnit.FormatterTest do
418
430
419
431
# 2
420
432
:bar
433
+ """
421
434
422
- Attempted function clauses (showing 5 out of 5):
435
+ if Access not in :cover . modules ( ) do
436
+ assert failure =~
437
+ """
438
+ Attempted function clauses (showing 5 out of 5):
423
439
424
- def fetch(%module{} = container, key)
425
- """
440
+ def fetch(%module{} = container, key)
441
+ """
442
+ end
426
443
427
444
assert failure =~ ~r" \( elixir #{ System . version ( ) } \) lib/access\. ex:\d +: Access\. fetch/2"
428
445
end
0 commit comments