]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-123811: Test that round(Decimal) can return signed zero (GH-124007) (#124048)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 24 Sep 2024 00:31:28 +0000 (02:31 +0200)
committerGitHub <noreply@github.com>
Tue, 24 Sep 2024 00:31:28 +0000 (17:31 -0700)
gh-123811: Test that round(Decimal) can return signed zero (GH-124007)
(cherry picked from commit b46c65ed2b78214cb8914779ac4e8d343ac4775e)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Lib/test/test_decimal.py

index 46755107de0102138ff6d39f824a4a1fdc7d0935..12479e32d0f5dbcea784fa67bc405a0f1bcf849f 100644 (file)
@@ -2071,7 +2071,9 @@ class UsabilityTest:
         #to quantize, which is already extensively tested
         test_triples = [
             ('123.456', -4, '0E+4'),
+            ('-123.456', -4, '-0E+4'),
             ('123.456', -3, '0E+3'),
+            ('-123.456', -3, '-0E+3'),
             ('123.456', -2, '1E+2'),
             ('123.456', -1, '1.2E+2'),
             ('123.456', 0, '123'),