Skip to content

Commit 1dc127a

Browse files
[3.14] gh-140036: Test modulo and divmod of pure Python Decimal in unbounded contexts (GH-160482) (#160809)
gh-140036: Test modulo and divmod of pure Python Decimal in unbounded contexts (GH-160482) (cherry picked from commit e7ab898) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
1 parent 85318d6 commit 1dc127a

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎Lib/test/test_decimal.py‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4716,6 +4716,16 @@ def test_divide_unbound_context(self):
47164716
x = self.decimal.Decimal('1')
47174717
y = x // 1 # should be fast
47184718

4719+
def test_modulo_unbound_context(self):
4720+
with self.unbound_context() as c:
4721+
x = self.decimal.Decimal('1')
4722+
y = x % 1 # should be fast
4723+
4724+
def test_divmod_unbound_context(self):
4725+
with self.unbound_context() as c:
4726+
x = self.decimal.Decimal('1')
4727+
y = divmod(x, 1) # should be fast
4728+
47194729
def test_remainder_near(self):
47204730
L = 1000
47214731
limit = sys.get_int_max_str_digits()

0 commit comments

Comments
 (0)