Skip to content

Commit 57164e7

Browse files
committed
Switch to pythoncall syntax in test
1 parent 1d8a45f commit 57164e7

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

src/rmstest.jl

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
import Logging
22
Logging.disable_logging(Logging.Warn)
33

4-
using PyCall
5-
const Chem = PyNULL()
6-
const molecule = PyNULL()
7-
const fragment = PyNULL()
8-
const pydot = PyNULL()
9-
copy!(Chem,pyimport_conda("rdkit.Chem","rdkit","rmg"))
4+
using PythonCall
5+
const Chem = PythonCall.pynew()
6+
const molecule = PythonCall.pynew()
7+
const fragment = PythonCall.pynew()
8+
const pydot = PythonCall.pynew()
9+
PythonCall.pycopy!(Chem, pyimport("rdkit.Chem"))
1010
try
11-
copy!(molecule, pyimport("rmgpy.molecule"))
12-
copy!(fragment, pyimport("rmgpy.molecule.fragment"))
11+
PythonCall.pycopy!(molecule, pyimport("rmgpy.molecule"))
12+
PythonCall.pycopy!(fragment, pyimport("rmgpy.molecule.fragment"))
1313
catch e
14-
copy!(molecule, pyimport_conda("molecule.molecule", "rmgmolecule", "hwpang"))
15-
copy!(fragment, pyimport_conda("molecule.molecule.fragment", "rmgmolecule", "hwpang"))
14+
PythonCall.pycopy!(molecule, pyimport("molecule.molecule"))
15+
PythonCall.pycopy!(fragment, pyimport("molecule.molecule.fragment"))
1616
end
17-
copy!(pydot,pyimport_conda("pydot","pydot","rmg"))
18-
17+
PythonCall.pycopy!(pydot, pyimport("pydot"))
1918

2019
include("Constants.jl")
2120
include("Tools.jl")

0 commit comments

Comments
 (0)