Skip to content

TST: More pytest idioms in tests/generic #45086

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

Merged
merged 4 commits into from
Dec 28, 2021

Conversation

mroeschke
Copy link
Member

  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them

@mroeschke mroeschke added the Testing pandas testing functions or related to the test suite label Dec 28, 2021
@jreback jreback added this to the 1.4 milestone Dec 28, 2021
else:
arr = np.empty(shape, dtype=dtype)
arr.fill(value)
def check_metadata(x, y=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you move this to _testing? and call it assert_metadata or similar (doc-string & typing if you can)

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

request for followup

@@ -1470,3 +1470,15 @@ def assert_indexing_slices_equivalent(ser: Series, l_slc: slice, i_slc: slice):
if not ser.index.is_integer():
# For integer indices, .loc and plain getitem are position-based.
assert_series_equal(ser[l_slc], expected)


def assert_metadata_equivalent(left, right):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally type these (followup ok)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these have to be Series/DataFrame?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also see if you can grep if we have any more _metadata checkers

@jreback jreback merged commit 3570efd into pandas-dev:master Dec 28, 2021
@mroeschke mroeschke deleted the ref/tests_generic branch December 28, 2021 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants