Skip to content

Commit d1764a6

Browse files
authored
unit test for trygetproperty (#1007)
1 parent 9bd0908 commit d1764a6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/runtests.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ const PyInt = pyversion < v"3" ? Int : Clonglong
290290
end
291291
@test convert(BigInt, PyObject(1234)) == 1234
292292

293-
# hasproperty, getproperty, and propertynames
293+
# hasproperty, getproperty, trygetproperty, and propertynames
294294
py"""
295295
class A:
296296
class B:
@@ -302,6 +302,7 @@ const PyInt = pyversion < v"3" ? Int : Clonglong
302302
A = py"A"
303303
@test hasproperty(A, "B")
304304
@test getproperty(A, "B") == py"A.B"
305+
@test PyCall.trygetproperty(A, "C", nothing) === py"None"
305306
@test :B in propertynames(A)
306307
@static if VERSION >= v"0.7-"
307308
@test :D in propertynames(A.B)

0 commit comments

Comments
 (0)