stefanluptak
Doctests in Livebook not working
Hi everybody! ![]()
When trying to use doctests in Livebook, I get this error:
** (ExUnit.DocTest.Error) #cell:brdghoceywtzil2oxanrzvpyqvy6mdh5: could not retrieve the documentation for module Foo. The BEAM file of the module cannot be accessed
(ex_unit 1.14.0) lib/ex_unit/doc_test.ex:513: ExUnit.DocTest.extract/1
(ex_unit 1.14.0) lib/ex_unit/doc_test.ex:235: ExUnit.DocTest.__doctests__/2
#cell:ex3gg7bj43xze5ovqwpk3rmwtdj3y533:5: (module)
(elixir 1.14.0) src/elixir_compiler.erl:65: :elixir_compiler.dispatch/4
(elixir 1.14.0) src/elixir_compiler.erl:50: :elixir_compiler.compile/3
(elixir 1.14.0) src/elixir_module.erl:379: :elixir_module.eval_form/6
(elixir 1.14.0) src/elixir_module.erl:105: :elixir_module.compile/5
(elixir 1.14.0) src/elixir_lexical.erl:15: :elixir_lexical.run/3
#cell:ex3gg7bj43xze5ovqwpk3rmwtdj3y533:3: (file)
Does anybody have an idea what is wrong? Or is this even supposed to work? It would be really cool if yes. ![]()
Example Livebook code:
defmodule Foo do
@doc """
iex> Foo.bar()
"X"
"""
def bar, do: "X"
end
ExUnit.start(auto_run: false)
defmodule FooTest do
use ExUnit.Case, async: false
doctest Foo
end
ExUnit.run()
Marked As Solved
bmitc
This is a known issue and is already fixed in Livebook’s main branch, but it hasn’t made it into a release yet.
I recently filed this issue and found all this out. ![]()
3
Also Liked
stefanluptak
FYI, it’s released now in the version 0.8.0.
1
Popular in Questions
What is the proper way to load a module from a file in to IEX?
In the python world, doing something like this pretty standard:
from ....
New
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
Hey guys.
I'm new to elixir and im really stocked about it. But I ran into a bit of problem - I need to convert a date sting, for examp...
New
What is most correct way to open, read and parse JSON file with poison?
For example if we have example.json file in root of some projec...
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
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
To simplify some tasks at work, I wrote and published this package yesterday. It’s a simple macro that enables Access behaviour on struct...
New
In AR this is so simple
@articles = current_user.articles
How to do in Ecto?
def index(conn, _params) do
current_user = conn.assig...
New
Other popular topics
Hi! May someone helps me, please!
I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
Hello!
tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability.
After spen...
New
You’re a programmer, so you don’t need spoon feeding with the conventional drivel about “this is an integer.” No. You need to know what’s...
New
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
I have followed this StackOverflow post to install the specific version of Erlang.
And When I am running mix ecto.setup then getting fol...
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
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
New
Hi everyone,
One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
by Lance Halvorsen
Elixir and Phoenix are generating tremendous excitement as an unbeatable platform for building modern web application...
New
I am trying to run a deploy with docker and I successfully runned with this command:
docker build -t romenigld/blog-prod .
but when I t...
New








