(get_module, orig_policy_name, event)
| 300 | |
| 301 | |
| 302 | async def concurrent_context2(get_module, orig_policy_name, event): |
| 303 | await event.wait() |
| 304 | # the policy is not affected by changes in parallel contexts |
| 305 | assert np.core.multiarray.get_handler_name() == orig_policy_name |
| 306 | # change policy in the child context |
| 307 | if orig_policy_name == 'default_allocator': |
| 308 | get_module.set_secret_data_policy() |
| 309 | assert np.core.multiarray.get_handler_name() == 'secret_data_allocator' |
| 310 | else: |
| 311 | get_module.set_old_policy(None) |
| 312 | assert np.core.multiarray.get_handler_name() == 'default_allocator' |
| 313 | |
| 314 | |
| 315 | async def async_test_context_locality(get_module): |
no outgoing calls
no test coverage detected