cjk
Mix test --cover crashes with a FunctionClauseError
Hi,
in a project I am maintaining I am working on increasing test coverage. But when I wanted to check the current state of coverage with mix test --cover, I got this error:
Cover compiling modules ...
** (exit) an exception was raised:
** (FunctionClauseError) no function clause matching in :cover."-patch_code1/2-lc$^0/1-1-"/1
cover.erl:2181: :cover."-patch_code1/2-lc$^0/1-1-"(2)
cover.erl:2181: :cover.patch_code1/2
cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
cover.erl:2191: :cover.patch_code_tuple/5
cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
cover.erl:1649: :cover.transform/4
cover.erl:602: :cover.call/1
(mix 1.11.3) lib/mix/tasks/test.coverage.ex:142: anonymous fn/2 in Mix.Tasks.Test.Coverage.cover_compile/1
(elixir 1.11.3) lib/enum.ex:2193: Enum."-reduce/3-lists^foldl/2-0-"/3
(mix 1.11.3) lib/mix/tasks/test.coverage.ex:141: Mix.Tasks.Test.Coverage.cover_compile/1
(mix 1.11.3) lib/mix/tasks/test.coverage.ex:122: Mix.Tasks.Test.Coverage.start/2
(mix 1.11.3) lib/mix/tasks/test.ex:336: Mix.Tasks.Test.do_run/3
(mix 1.11.3) lib/mix/task.ex:394: Mix.Task.run_task/3
(mix 1.11.3) lib/mix/task.ex:439: Mix.Task.run_alias/5
08:53:12.591 [error] Process #PID<0.3787.0> raised an exception
** (FunctionClauseError) no function clause matching in :cover."-patch_code1/2-lc$^0/1-1-"/1
cover.erl:2181: :cover."-patch_code1/2-lc$^0/1-1-"(2)
cover.erl:2181: :cover.patch_code1/2
cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
cover.erl:2191: :cover.patch_code_tuple/5
cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
cover.erl:1649: :cover.transform/4
Am I doing something wrong?
Best regards,
CK
Marked As Solved
josevalim
Creator of Elixir
That’s definitely a bug. Make sure you are on latest Elixir and, if the bug persists, please open up a report!
Popular in Questions
Hi all,
Trying to get some more clarity over utc_datetime and naive_datetime for Ecto:
https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
Hi there, I'm working through my first release with elixir/phoenix. I've built a release with distillery and found that it crashes when I...
New
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
I would like to know what is the best IDE for elixir development?
New
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
Hey all,
I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
Hi all
I want to have a unix time, from the current time plus 1 hour.
DateTime.now + 1 hour
How to get it in elixir?
Thanks
New
After calling mix ecto.create I get this error:
17:00:32.162 [error] GenServer #PID<0.412.0> terminating
** (Postgrex.Error) FATAL...
New
I will often find my self writing things similar to:
case some_value do
nil -> something()
"" -> something()
_ -> someth...
New
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
Other popular topics
Update:
How to use the Blogs & Podcasts section
You can post links to your blog posts or podcasts either in one of the Official Blog...
New
Manning 2016 Halloween weekend sale via Deal of the Day
Friday, October 28 - Half off all MEAPs - code WM102816LT
Saturday, October 29 ...
New
Hi there,
I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
Good day to you all.
I have been struggling to get a query involving like and ilike to work.
Can anyone assist me on this, please?
pro...
New
i’m a new one to elixir
which editor can i use
vs code? or atom?
Thanks! :smiley:
New
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this
"1000"
What is the ...
New
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors:
[WARN] - (starship::utils): Executing command ...
New
Hey :wave:t3: Elixir community,
I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New







