chemfiles / Chemfiles.jl

Julia bindings to chemfiles

Home Page:http://chemfiles.org/Chemfiles.jl/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

test: UndefVarError: contains not defined

aquarelleX332 opened this issue · comments

With julia-1.5.3:

julia> Pkg.test("Chemfiles")

led to:

`Test Summary: | Pass Total
Generics | 1 1
Test Summary: | Pass Total
Atom | 16 16
WARNING: both Chemfiles and Base export "contains"; uses of it in module Main must be qualified
Residue: Error During Test at $HOME/.julia/packages/Chemfiles/uJPdJ/test/Residue.jl:22
Test threw exception
Expression: contains(residue, 56) == true
UndefVarError: contains not defined
Stacktrace:
[1] top-level scope at $HOME.julia/packages/Chemfiles/uJPdJ/test/Residue.jl:22
[2] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:1115
[3] top-level scope at $HOME/.julia/packages/Chemfiles/uJPdJ/test/Residue.jl:2

Test Summary: | Pass Error Total
Residue | 12 1 13
ERROR: LoadError: LoadError: Some tests did not pass: 12 passed, 0 failed, 1 errored, 0 broken.
in expression starting at $HOME/.julia/packages/Chemfiles/uJPdJ/test/Residue.jl:1
in expression starting at $HOME/.julia/packages/Chemfiles/uJPdJ/test/runtests.jl:28
ERROR: Package Chemfiles errored during testing`

The problem was circumvented in Residue.jl (line: ) by using:
@test **Chemfiles.contains**(residue, 56) == true

Thanks for reporting this error!

I'm a bit puzzled by the warning both Chemfiles and Base export "contains"; uses of it in module Main must be qualified since the export should be guarded by a version check:

if VERSION < v"1.5.0-alpha"
export contains
end
.

I'm currently updating this package to chemfiles 0.10, and as part of it I changed this code to use Compat instead, which should be the right thing to do. So the next version should have this fixed.

I'll check if I can reproduce this error with julia-1.5.3, it is not happening on 1.5.0 =/

Ok, now I remember: this is already fixed in master, but not in the version registered in General.jl. Given that version 0.10 is coming soon, I'd rather not spend the time to do a 0.9.4 release.

If you need the fix in the mean time, you can run Pkg.rm("Chemfiles") and the Pkg.develop("Chemfiles") to get the latest master.

Now that version 0.10.0 have been released, this should be fixed!