In a library I am developing I execute the following:
if function_exported?(type, :foo, 0) do
# some code
When I run my tests, once on five this function will return false, for the same data.
So I was looking to get some more information, and inserted the code below to do some inspection, right before the condition:
if type == FooLib.Foo do
IO.inspect function_exported?(type, :foo, 0)
IO.inspect type.foo()
end
But since I added this code, the if
condition thereafter now always returns true for the same data… and tests always pass.
Something weird is going on. Any idea?