Skip to content

Fix: Reanme duplicate function names in unittests #48906

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

Conversation

FloHofstetter
Copy link
Contributor

@FloHofstetter FloHofstetter commented Oct 1, 2022

@@ -437,28 +437,28 @@ def check_col(key, name, size):

with ensure_clean_store(setup_path) as store:

def check_col(key, name, size):
def check_col_1(key, name, size):
assert getattr(store.get_storer(key).table.description, name).itemsize, size
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for doing this @FloHofstetter !

🤔 what an odd function...I wonder if it was meant to be

            assert getattr(store.get_storer(key).table.description, name).itemsize == size

I'll look through the history to see if there's any clues

Copy link
Member

Choose a reason for hiding this comment

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

Indeed 😄

https://github.com/pandas-dev/pandas/pull/16169/files

             def check_col(key, name, size):
-                self.assertEqual(getattr(store.get_storer(
-                    key).table.description, name).itemsize, size)
+                assert getattr(store.get_storer(key)
+                               .table.description, name).itemsize, size

cc @gfyoung this is typo right? Just double-checking, in case you remember

Looks like this should be the same as check_col_0 above, can we just keep that one as check_col and remove this one @FloHofstetter ?

Copy link
Member

Choose a reason for hiding this comment

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

Yep, that indeed looks like a typo @MarcoGorelli

@@ -437,28 +437,28 @@ def check_col(key, name, size):

with ensure_clean_store(setup_path) as store:

def check_col(key, name, size):
def check_col_1(key, name, size):
assert getattr(store.get_storer(key).table.description, name).itemsize, size
Copy link
Member

Choose a reason for hiding this comment

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

Indeed 😄

https://github.com/pandas-dev/pandas/pull/16169/files

             def check_col(key, name, size):
-                self.assertEqual(getattr(store.get_storer(
-                    key).table.description, name).itemsize, size)
+                assert getattr(store.get_storer(key)
+                               .table.description, name).itemsize, size

cc @gfyoung this is typo right? Just double-checking, in case you remember

Looks like this should be the same as check_col_0 above, can we just keep that one as check_col and remove this one @FloHofstetter ?

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

Looks good to me pending green, thanks @FloHofstetter

@MarcoGorelli MarcoGorelli added this to the 1.6 milestone Oct 2, 2022
@MarcoGorelli MarcoGorelli added the Code Style Code style, linting, code_checks label Oct 2, 2022
@FloHofstetter
Copy link
Contributor Author

Hi @MarcoGorelli,

I don't get how to rerun the failed action... Do I have permission to re-trigger?

-- Flo

@MarcoGorelli
Copy link
Member

it's unrelated, don't worry about it

@MarcoGorelli MarcoGorelli merged commit e43d75e into pandas-dev:main Oct 3, 2022
@mroeschke mroeschke modified the milestones: 1.6, 2.0 Oct 13, 2022
noatamir pushed a commit to noatamir/pandas that referenced this pull request Nov 9, 2022
* Fix: Reanme duplicate function names in unittests

* Fix: Reanme duplicate function names in unittests

* Fix: Reanme duplicate function names in unittests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants