|
2 | 2 | import Markdown |
3 | 3 | @testset "pyis" begin |
4 | 4 | x = pylist() |
5 | | - y = PythonCall.pynew(x) |
| 5 | + y = PythonCall.Core.pynew(x) |
6 | 6 | z = pylist() |
7 | 7 | @test pyis(x, x) |
8 | 8 | @test pyis(x, y) |
|
218 | 218 | @test Base.Docs.getdoc(Py(nothing)) isa Markdown.MD |
219 | 219 | @test Base.Docs.getdoc(Py(12)) isa Markdown.MD |
220 | 220 | @test Base.Docs.getdoc(pybuiltins.int) isa Markdown.MD |
221 | | - @test Base.Docs.getdoc(PythonCall.PyNULL) === nothing |
| 221 | + @test Base.Docs.getdoc(PythonCall.Core.PyNULL) === nothing |
222 | 222 | end |
223 | 223 | @testset "comparisons" begin |
224 | 224 | @testset "Py vs Py" begin |
@@ -255,14 +255,14 @@ end |
255 | 255 | @test_throws PyException pyiter(pybuiltins.True) |
256 | 256 | # unsafe_pynext |
257 | 257 | it = pyiter(pyrange(2)) |
258 | | - x = PythonCall.unsafe_pynext(it) |
259 | | - @test !PythonCall.pyisnull(x) |
| 258 | + x = PythonCall.Core.unsafe_pynext(it) |
| 259 | + @test !PythonCall.Core.pyisnull(x) |
260 | 260 | @test pyeq(Bool, x, 0) |
261 | | - x = PythonCall.unsafe_pynext(it) |
262 | | - @test !PythonCall.pyisnull(x) |
| 261 | + x = PythonCall.Core.unsafe_pynext(it) |
| 262 | + @test !PythonCall.Core.pyisnull(x) |
263 | 263 | @test pyeq(Bool, x, 1) |
264 | | - x = PythonCall.unsafe_pynext(it) |
265 | | - @test PythonCall.pyisnull(x) |
| 264 | + x = PythonCall.Core.unsafe_pynext(it) |
| 265 | + @test PythonCall.Core.pyisnull(x) |
266 | 266 | # pynext |
267 | 267 | it = pyiter(pyrange(2)) |
268 | 268 | x = pynext(it) |
@@ -825,18 +825,18 @@ end |
825 | 825 | @test showable(MIME("text/plain"), Py(nothing)) |
826 | 826 | @test showable(MIME("text/plain"), Py(12)) |
827 | 827 | # https://github.com/JuliaPy/PythonCall.jl/issues/522 |
828 | | - @test showable(MIME("text/plain"), PythonCall.pynew()) |
829 | | - @test !showable(MIME("text/html"), PythonCall.pynew()) |
| 828 | + @test showable(MIME("text/plain"), PythonCall.Core.pynew()) |
| 829 | + @test !showable(MIME("text/html"), PythonCall.Core.pynew()) |
830 | 830 | end |
831 | 831 | @testset "show" begin |
832 | 832 | @test sprint(show, MIME("text/plain"), Py(nothing)) == "Python: None" |
833 | 833 | @test sprint(show, MIME("text/plain"), Py(12)) == "Python: 12" |
834 | 834 | # https://github.com/JuliaPy/PythonCall.jl/issues/522 |
835 | | - @test sprint(show, MIME("text/plain"), PythonCall.pynew()) == "Python: NULL" |
| 835 | + @test sprint(show, MIME("text/plain"), PythonCall.Core.pynew()) == "Python: NULL" |
836 | 836 | # test compact printing |
837 | 837 | @test sprint(show, MIME("text/plain"), Py(String('A':'Z')), context=(:compact=>true, :displaysize=>(50, 20))) == "Py: 'ABCDE ... WXYZ'" |
838 | 838 | @test sprint(show, MIME("text/plain"), Py(String('A':'Z')), context=(:compact=>true, :limit=>false, :displaysize=>(50, 20))) == "Py: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" |
839 | | - @test_throws MethodError sprint(show, MIME("text/html"), PythonCall.pynew()) |
| 839 | + @test_throws MethodError sprint(show, MIME("text/html"), PythonCall.Core.pynew()) |
840 | 840 | end |
841 | 841 | end |
842 | 842 |
|
|
0 commit comments