From 6ca0769a2f82c7c7d6a34fda2571b9ae15950842 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Mon, 4 Apr 2016 17:32:24 -0400 Subject: add recursive version of PyCall's pywrap Will be used to have deeply nested Julia Modules for deeply nested Python modules Eg, os.path.genericpath.* in python becomes os.path.genericpath.* in Julia. This version only works with modules, not Python classes. Thanks to James Porter at the Recurse Center for helping with this! --- test/runtests.jl | 5 +++++ test/test_pyrecwrap.jl | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 test/test_pyrecwrap.jl (limited to 'test') diff --git a/test/runtests.jl b/test/runtests.jl index d0bb3c7..c4beb52 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -3,8 +3,13 @@ println("Importing libs...") include("../src/PyX.jl") using PyX using LaTeXStrings +using PyCall using Base.Test +##### Helpers +println("Testing helpers...") +include("test_pyrecwrap.jl") + ##### Setup Common Objects println("Creating test objects...") include("test_objects.jl") diff --git a/test/test_pyrecwrap.jl b/test/test_pyrecwrap.jl new file mode 100644 index 0000000..cef3f08 --- /dev/null +++ b/test/test_pyrecwrap.jl @@ -0,0 +1,4 @@ + +os_test = PyX.pyrecwrap(pyimport("os")) +@test os_test.path.genericpath.os.path.genericpath.os.path.genericpath != nothing + -- cgit v1.2.3