Skip to content

Commit

Permalink
Inherit from AssertionError in tests instead of polynomial
Browse files Browse the repository at this point in the history
  • Loading branch information
cstjean committed Mar 22, 2018
1 parent f7801a3 commit 32650e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down

0 comments on commit 32650e8

Please sign in to comment.