Skip to content

Commit 9a9e052

Browse files
committed
Remove suite warnings
1 parent 88c0371 commit 9a9e052

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

lib/ex_unit/test/ex_unit/assertions_test.exs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -765,8 +765,8 @@ defmodule ExUnit.AssertionsTest do
765765
@compile {:no_warn_undefined, Not.Defined}
766766

767767
test "assert raise with some other error" do
768-
"This should never be tested" =
769-
assert_raise ArgumentError, fn -> Not.Defined.function(1, 2, 3) end
768+
assert_raise ArgumentError, fn -> Not.Defined.function(1, 2, 3) end
769+
flunk("This should never be tested")
770770
rescue
771771
error in [ExUnit.AssertionError] ->
772772
"Expected exception ArgumentError but got UndefinedFunctionError " <>
@@ -775,8 +775,8 @@ defmodule ExUnit.AssertionsTest do
775775
end
776776

777777
test "assert raise with some other error includes stacktrace from original error" do
778-
"This should never be tested" =
779-
assert_raise ArgumentError, fn -> Not.Defined.function(1, 2, 3) end
778+
assert_raise ArgumentError, fn -> Not.Defined.function(1, 2, 3) end
779+
flunk("This should never be tested")
780780
rescue
781781
ExUnit.AssertionError ->
782782
[{Not.Defined, :function, [1, 2, 3], _} | _] = __STACKTRACE__
@@ -1057,7 +1057,7 @@ defmodule ExUnit.AssertionsTest do
10571057
""" = Exception.message(error)
10581058
end
10591059

1060-
defp ok(val), do: {:ok, val}
1061-
defp error(val), do: {:error, val}
1060+
defp ok(val), do: Process.get(:unused, {:ok, val})
1061+
defp error(val), do: Process.get(:unused, {:error, val})
10621062
defp not_equal(left, right), do: left != right
10631063
end

lib/ex_unit/test/ex_unit/formatter_test.exs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ defmodule ExUnit.FormatterTest do
7979
test "formats test exits with function clause mfa" do
8080
{error, stack} =
8181
try do
82-
Access.fetch(:foo, :bar)
82+
Access.fetch(Process.get(:unused, :foo), :bar)
8383
catch
8484
:error, error -> {error, __STACKTRACE__}
8585
end
@@ -161,7 +161,7 @@ defmodule ExUnit.FormatterTest do
161161
test "formats test EXITs with function clause errors" do
162162
{error, stack} =
163163
try do
164-
Access.fetch(:foo, :bar)
164+
Access.fetch(Process.get(:unused, :foo), :bar)
165165
catch
166166
:error, error -> {error, __STACKTRACE__}
167167
end
@@ -411,7 +411,7 @@ defmodule ExUnit.FormatterTest do
411411
test "blames function clause error" do
412412
{error, stack} =
413413
try do
414-
Access.fetch(:foo, :bar)
414+
Access.fetch(Process.get(:unused, :foo), :bar)
415415
rescue
416416
exception -> {exception, __STACKTRACE__}
417417
end

0 commit comments

Comments
 (0)