Skip to content

Commit bafe884

Browse files
committed
unit tests
1 parent eecc503 commit bafe884

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/test_base.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,15 @@ def test_methods_no_arg(
133133
('__getitem__', 'int', [1, 2, 3], 1, {'index': 0}),
134134
('__getitem__', 'string', ['foo', 'bar', 'baz'], 'foo', {'index': 0}),
135135
136+
('__getitem__', 'bool', [True, False, True],
137+
[True, True], {'index': ul.IndexList([0, 2])}),
138+
('__getitem__', 'float', [1.0, 2.0, 3.0], [1.0, 3.0],
139+
{'index': ul.IndexList([0, 2])}),
140+
('__getitem__', 'int', [1, 2, 3],
141+
[1, 3], {'index': ul.IndexList([0, 2])}),
142+
('__getitem__', 'string', ['foo', 'bar', 'baz'],
143+
['foo', 'baz'], {'index': ul.IndexList([0, 2])}),
144+
136145
("apply", "bool", [True, False], [
137146
False, True], {"fn": lambda x: x == False},), # noqa: E712
138147
("apply", "float", [1.0, 2.0], [
@@ -197,6 +206,15 @@ def test_methods_no_arg(
197206
('get', 'int', [1, 2, 3], 1, {'index': 0}),
198207
('get', 'string', ['foo', 'bar', 'baz'], 'foo', {'index': 0}),
199208
209+
('get_by_indexes', 'bool', [True, False, True],
210+
[True, True], {'indexes': ul.IndexList([0, 2])}),
211+
('get_by_indexes', 'float', [1.0, 2.0, 3.0], [1.0, 3.0],
212+
{'indexes': ul.IndexList([0, 2])}),
213+
('get_by_indexes', 'int', [1, 2, 3],
214+
[1, 3], {'indexes': ul.IndexList([0, 2])}),
215+
('get_by_indexes', 'string', ['foo', 'bar', 'baz'],
216+
['foo', 'baz'], {'indexes': ul.IndexList([0, 2])}),
217+
200218
("not_equal_scala", 'bool', [False, True, False], [
201219
True, False, True], {"elem": True}),
202220
("not_equal_scala", 'float', [1.0, 2.0, 3.0], [

0 commit comments

Comments
 (0)