MCPcopy Create free account
hub / github.com/dask/dask / test_str_accessor_cat

Function test_str_accessor_cat

dask/dataframe/dask_expr/tests/test_string_accessor.py:117–129  ·  view source on GitHub ↗
(ser, dser)

Source from the content-addressed store, hash-verified

115
116
117def test_str_accessor_cat(ser, dser):
118 sol = ser.str.cat(ser.str.upper(), sep=":")
119 assert_eq(dser.str.cat(dser.str.upper(), sep=":"), sol)
120 assert_eq(dser.str.cat(ser.str.upper(), sep=":"), sol)
121 assert_eq(
122 dser.str.cat([dser.str.upper(), ser.str.lower()], sep=":"),
123 ser.str.cat([ser.str.upper(), ser.str.lower()], sep=":"),
124 )
125 assert_eq(dser.str.cat(sep=":"), ser.str.cat(sep=":"))
126
127 for o in ["foo", ["foo"]]:
128 with pytest.raises(TypeError):
129 dser.str.cat(o)
130
131
132@pytest.mark.parametrize("index", [None, [0]], ids=["range_index", "other index"])

Callers

nothing calls this directly

Calls 2

assert_eqFunction · 0.90
catMethod · 0.80

Tested by

no test coverage detected