Skip to content

Commit 3e63fd5

Browse files
author
Christopher Doris
committed
more tests
1 parent 2f8837f commit 3e63fd5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/abstract.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
@testset "pygetattr" begin
2525
@test pyisinstance(pygetattr(pybuiltins.None, "__class__"), pybuiltins.type)
2626
@test_throws PyException pygetattr(pybuiltins.None, "not_an_attr")
27+
@test pyisinstance(pygetattr(pybuiltins.None, "__class__", pybuiltins.None), pybuiltins.type)
2728
@test pyis(pygetattr(pybuiltins.None, "not_an_attr", pybuiltins.None), pybuiltins.None)
2829
end
2930
@testset "pysetattr" begin
@@ -159,27 +160,31 @@
159160
@testset "pylt" begin
160161
for a in -1:1
161162
for b in -1:1
163+
@test pyis(pylt(pyint(a), pyint(b)), pybool(a < b))
162164
@test pylt(Bool, pyint(a), pyint(b)) == (a < b)
163165
end
164166
end
165167
end
166168
@testset "pyle" begin
167169
for a in -1:1
168170
for b in -1:1
171+
@test pyis(pyle(pyint(a), pyint(b)), pybool(a b))
169172
@test pyle(Bool, pyint(a), pyint(b)) == (a b)
170173
end
171174
end
172175
end
173176
@testset "pygt" begin
174177
for a in -1:1
175178
for b in -1:1
179+
@test pyis(pygt(pyint(a), pyint(b)), pybool(a > b))
176180
@test pygt(Bool, pyint(a), pyint(b)) == (a > b)
177181
end
178182
end
179183
end
180184
@testset "pyge" begin
181185
for a in -1:1
182186
for b in -1:1
187+
@test pyis(pyge(pyint(a), pyint(b)), pybool(a b))
183188
@test pyge(Bool, pyint(a), pyint(b)) == (a b)
184189
end
185190
end

0 commit comments

Comments
 (0)