-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TST: move to indices fixture instead of create_index #32916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
def test_tolist_matches_list(indices): | ||
assert indices.tolist() == list(indices) | ||
class TestRendering: | ||
def test_str(self, indices): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, may need to rethink this test now testing over all indexes since "tuples": MultiIndex.from_tuples(zip(["foo", "bar", "baz"], [1, 2, 3])), so "foo" is already in str(indices)
|
||
@pytest.mark.parametrize("label", [1.0, "foobar", "xyzzy", np.nan]) | ||
def test_isin_level_kwarg_bad_label_raises(self, label, indices): | ||
index = indices | ||
if isinstance(index, MultiIndex): | ||
index = index.rename(["foo", "bar"]) | ||
index = index.rename(["foo", "bar"] + index.names[2:]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, I think the intention of the explicitly renaming was to ensure that the labels being tested were not already in the index.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jbrockmendel generally lgtm.
thanks @jbrockmendel |
No description provided.