Skip to content

Commit 645891f

Browse files
committed
Fix for Android/iOS CI test failure.
1 parent ed4def6 commit 645891f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Lib/test/test_decimal.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1849,7 +1849,10 @@ async def parent():
18491849
results['parent_after_prec'] = getcontext().prec
18501850
return results
18511851

1852-
results = asyncio.run(parent())
1852+
# Pass loop_factory so asyncio.run() doesn't lazily initialize the
1853+
# global event loop policy, which would be reported as "env changed"
1854+
# by regrtest (e.g. on iOS/Android where the policy starts as None).
1855+
results = asyncio.run(parent(), loop_factory=asyncio.EventLoop)
18531856

18541857
# Child inherits the parent's precision value...
18551858
self.assertEqual(results['child_initial_prec'], 33)

0 commit comments

Comments
 (0)