Skip to content

Commit

Permalink
test(backends): add re_split test
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud authored and gforsyth committed Dec 19, 2023
1 parent e1f4fa7 commit e18d725
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions ibis/backends/tests/test_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
except ImportError:
PythonException = None

try:
from google.api_core.exceptions import BadRequest
except ImportError:
BadRequest = None


@pytest.mark.parametrize(
("text_value", "expected_types"),
Expand Down Expand Up @@ -1103,3 +1098,28 @@ def test_non_match_regex_search_is_false(con):
result = con.execute(expr)
assert isinstance(result, (bool, np.bool_))
assert not result


@pytest.mark.notimpl(
[
"dask",
"datafusion",
"impala",
"mysql",
"sqlite",
"mssql",
"druid",
"oracle",
"flink",
"exasol",
"pandas",
"bigquery",
"polars",
],
raises=com.OperationNotDefinedError,
)
def test_re_split(con):
lit = ibis.literal(",a,,,,c")
expr = lit.re_split(",+")
result = con.execute(expr)
assert result == ["", "a", "c"]

0 comments on commit e18d725

Please sign in to comment.