Skip to content

TST: added test for to_json when called on numbers exceeding the int64 limit #47589

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 3 commits into from
Jul 5, 2022

Conversation

johnmantios
Copy link
Contributor

Added test for to_json() when called on numbers exceeding the int64 limit.
Tests and linter pass locally.

],
)
@pytest.mark.parametrize("orient", ["split"])
def test_json_uint64(self, data, expected, orient):
Copy link
Member

Choose a reason for hiding this comment

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

This is only one test right? You don’t have to paeametrize over arguments that take only one value

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh ok. Should I refactor and resubmit?

Copy link
Member

Choose a reason for hiding this comment

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

You can just update this brancj

'{"columns":["col1"],"index":[0,1],'
'"data":[[13342205958987758245],[12388075603347835679]]}'
)
orient = "split"
Copy link
Member

Choose a reason for hiding this comment

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

You don't have to define orient or data as variables, just put them into the functions directly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback! This is my first contribution to open source, so bear with me :)

@mroeschke mroeschke added this to the 1.5 milestone Jul 5, 2022
@mroeschke mroeschke added the Testing pandas testing functions or related to the test suite label Jul 5, 2022
@mroeschke mroeschke merged commit 5fb276a into pandas-dev:main Jul 5, 2022
@mroeschke
Copy link
Member

Thanks @johnmantios

yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
…4 limit (pandas-dev#47589)

* TST: added test for to_json when called on numbers that exceed the int64 limit

* TST: removed redundant parametrize wrapper

* TST: removed redundant variable declarations
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.

pandas dataframe to_json(orient='split') change uint64 to negative int
3 participants