Skip to content

Commit 8d7d9f2

Browse files
committed
chore: add test for all optional arguments
1 parent 12e8a24 commit 8d7d9f2

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

python/tests/test_functions.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,25 @@ def test_array_function_obj_tests(stmt, py_expr):
780780
f.regexp_instr(column("a"), literal("([lr])"), n=literal(2)),
781781
pa.array([4, 4, 0], type=pa.int64()),
782782
),
783+
(
784+
f.regexp_instr(
785+
column("a"),
786+
literal("(x)?([hw])"),
787+
start=literal(1),
788+
n=literal(1),
789+
flags=literal("i"),
790+
sub_expr=literal(2),
791+
),
792+
pa.array([1, 1, 0], type=pa.int64()),
793+
),
794+
(
795+
f.regexp_instr(column("a"), literal("([hw])"), flags=literal("i")),
796+
pa.array([1, 1, 0], type=pa.int64()),
797+
),
798+
(
799+
f.regexp_instr(column("a"), literal("(x)?([HW])"), sub_expr=literal(2)),
800+
pa.array([1, 1, 0], type=pa.int64()),
801+
),
783802
],
784803
)
785804
def test_string_functions(df, function, expected_result):

0 commit comments

Comments
 (0)