Skip to content

Commit 1f146e6

Browse files
committed
Fix for Android/iOS CI test failure.
1 parent 1e60975 commit 1f146e6

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
@@ -1852,7 +1852,10 @@ async def parent():
18521852
results['parent_after_prec'] = getcontext().prec
18531853
return results
18541854

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

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

0 commit comments

Comments
 (0)