Skip to content

Fix panic from test_int__format__locale #4711

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 2 commits into from
Mar 23, 2023

Conversation

minhrongcon2000
Copy link
Contributor

@minhrongcon2000 minhrongcon2000 commented Mar 18, 2023

Fix #4588

closes #4593

@youknowone youknowone changed the title Fix #4588 Fix panic from test_int__format__locale Mar 18, 2023
@youknowone
Copy link
Member

would you remove skip from the test and add test case commit from #4593 to ensure it is fixed?

@minhrongcon2000
Copy link
Contributor Author

It will still fail because I didn't integrate locale into format integer with numeric option... But if you want to remove it to test whether it is panic, I will do it!

@youknowone
Copy link
Member

youknowone commented Mar 18, 2023

you can replace skip with expectedFailure in that case. At least we can test if it is crash or not.

@@ -493,6 +493,5 @@ def test_precision_c_limits(self):
with self.assertRaises(ValueError) as cm:
format(c, ".%sf" % (INT_MAX + 1))


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 not intended change, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah! This is not intended

Copy link
Member

Choose a reason for hiding this comment

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

please also revert this line too

@@ -493,6 +493,5 @@ def test_precision_c_limits(self):
with self.assertRaises(ValueError) as cm:
format(c, ".%sf" % (INT_MAX + 1))


Copy link
Member

Choose a reason for hiding this comment

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

please also revert this line too

youknowone
youknowone previously approved these changes Mar 21, 2023
Copy link
Member

@youknowone youknowone left a comment

Choose a reason for hiding this comment

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

Thank you!

@youknowone
Copy link
Member

rerunning CI with #4593

@youknowone youknowone dismissed their stale review March 21, 2023 06:08

the test case seems not fixed

@youknowone
Copy link
Member

Could you check the test result? new code seems generating malformatted string.

---- format::tests::test_format_int_sep stdout ----
thread 'format::tests::test_format_int_sep' panicked at 'assertion failed: `(left == right)`
  left: `Ok("0000001234567,890,123,456,789,012,345,678")`,
 right: `Ok("1,234,567,890,123,456,789,012,345,678")`', common/src/format.rs:1035:9

Copy link
Member

@youknowone youknowone left a comment

Choose a reason for hiding this comment

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

Thanks!

@youknowone youknowone merged commit 4d04e55 into RustPython:main Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Format panic in test_int__format__locale
2 participants