Skip to content

Commit 91b07ca

Browse files
[3.15] gh-140036: Test modulo and divmod of pure Python Decimal in unbounded contexts (GH-160482) (#160808)
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 9070cd5 commit 91b07ca

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
@@ -4721,6 +4721,16 @@ def test_divide_unbound_context(self):
47214721
x = self.decimal.Decimal('1')
47224722
y = x // 1 # should be fast
47234723

4724+
def test_modulo_unbound_context(self):
4725+
with self.unbound_context() as c:
4726+
x = self.decimal.Decimal('1')
4727+
y = x % 1 # should be fast
4728+
4729+
def test_divmod_unbound_context(self):
4730+
with self.unbound_context() as c:
4731+
x = self.decimal.Decimal('1')
4732+
y = divmod(x, 1) # should be fast
4733+
47244734
def test_remainder_near(self):
47254735
L = 1000
47264736
limit = sys.get_int_max_str_digits()

0 commit comments

Comments
 (0)