# Chemfiles -- contains

**URL:** <https://discourse.julialang.org/t/chemfiles-contains/53493>\
**Category:** Chemistry\
**Created:** [January 17, 2021, 5:07pm UTC](https://discourse.julialang.org/t/chemfiles-contains/53493 "2021-01-17T17:07:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aquarelleX332](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aquarellex332/32/21048_2.png) [@aquarelleX332](https://discourse.julialang.org/u/aquarelleX332)\
**Post date:** [January 17, 2021, 5:07pm UTC](https://discourse.julialang.org/t/chemfiles-contains/53493/1 "2021-01-17T17:07:04Z")

</div>

Hello dear all,

I tried to install [Chemfiles.jl](https://github.com/chemfiles/Chemfiles.jl). During the test:

```julia
julia> Pkg.test("Chemfiles")

```

I obtained an error:

```julia
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/aquarelle/.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/aquarelle/.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/aquarelle/.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/aquarelle/.julia/packages/Chemfiles/uJPdJ/test/Residue.jl:1
in expression starting at /home/aquarelle/.julia/packages/Chemfiles/uJPdJ/test/runtests.jl:28
ERROR: Package Chemfiles errored during testing

```

I tried to substitute “contains” by “occursin” (with the permutation of arguments) but it doesn’t work.  
Any ideas?

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [January 17, 2021, 5:48pm UTC](https://discourse.julialang.org/t/chemfiles-contains/53493/2 "2021-01-17T17:48:13Z")

</div>

To avoid the error use:

> [@aquarelleX332](#):
>
> `Chemfiles.contains(residue, 56)`

If it is a good idea to keep that name or not is up to the developers. Maybe it is a good idea to file an issue. (to avoid that error they have to explicitly import `contains` from base in their module, before overloading it).

---

<div class="post-metadata">

**Author:** ![aquarelleX332](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aquarellex332/32/21048_2.png) [@aquarelleX332](https://discourse.julialang.org/u/aquarelleX332)\
**Post date:** [January 17, 2021, 6:34pm UTC](https://discourse.julialang.org/t/chemfiles-contains/53493/3 "2021-01-17T18:34:36Z")

</div>

Many thanks leandromartinez98. 😉  
Indeed I am going to file an issue.
