From 32650e8a9fcb2734de1a91f751153d60a7a1f7ac Mon Sep 17 00:00:00 2001 From: Cedric St-Jean Date: Wed, 21 Mar 2018 22:10:37 -0400 Subject: [PATCH] Inherit from AssertionError in tests instead of polynomial --- test/runtests.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index ad028108..4e176531 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -458,8 +458,7 @@ end end # @pydef example from README -@pyimport numpy.polynomial as P -@pydef type Doubler <: P.Polynomial +@pydef type Doubler <: PyCall.builtin[:AssertionError] __init__(self, x=10) = (self[:x] = x) function my_method(self, arg1::Number) return arg1 + 20 @@ -475,6 +474,7 @@ d = Doubler(5) d[:x2] = 30 @test d[:x] == 15 @test d[:type_str](10) == string(Int) +@test PyCall.builtin[:isinstance](d, PyCall.builtin[:AssertionError]) @test_throws ErrorException @pywith IgnoreError(false) error()