-
-
Notifications
You must be signed in to change notification settings - Fork 804
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix[test]: fix a bad bound in decimal fuzzing (#3909)
the decimal fuzz test `is_valid` condition was based on an ancient version of decimals which had bounds at `-2**127` and `2**127`. update the condition to be compatible with the latest version of `decimal`. also increase the range of decimals produced by the decimal fuzzing strategy, so that the fuzzer finds overflow issues faster. an additional issue was found in the fuzz tests, which is that some decimal operations panic with `decimal.InvalidOperation` instead of a proper exception. this is a known bug, see GH #2241. this fixes the issue by catching the exception and raising an `OverflowException`. misc/refactor: - refactor several uses of quantize into a utility function
- Loading branch information
1 parent
dc62e7a
commit ee11e3d
Showing
5 changed files
with
51 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters