Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pandas/tests/strings/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@
],
[()] * 100,
[{}] * 100,
strict=False,
)
)
ids, _, _ = zip(*_any_string_method) # use method name as fixture-id
ids, _, _ = zip(*_any_string_method, strict=True) # use method name as fixture-id
missing_methods = {f for f in dir(StringMethods) if not f.startswith("_")} - set(ids)

# test that the above list captures all methods of StringMethods
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/strings/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
("empty", []),
("mixed-integer", ["a", np.nan, 2]),
]
ids, _ = zip(*_any_allowed_skipna_inferred_dtype) # use inferred type as id
ids, _ = zip(*_any_allowed_skipna_inferred_dtype, strict=True) # use inferred type as id


@pytest.fixture(params=_any_allowed_skipna_inferred_dtype, ids=ids)
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/strings/test_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ def test_cat_on_bytes_raises():

def test_str_accessor_in_apply_func():
# https://github.com/pandas-dev/pandas/issues/38979
df = DataFrame(zip("abc", "def"))
df = DataFrame(zip("abc", "def", strict=True))
expected = Series(["A/D", "B/E", "C/F"])
result = df.apply(lambda f: "/".join(f.str.upper()), axis=1)
tm.assert_series_equal(result, expected)
Expand Down
Loading