joemarshall commented on code in PR #37822:
URL: https://github.com/apache/arrow/pull/37822#discussion_r1633277451


##########
python/scripts/run_emscripten_tests.py:
##########


Review Comment:
   Yeah, it's because numpy uses the pytest-pyodide plugin, with some code I 
wrote. What that does is start one interpreter, then call `pytest.main` for 
each individual test. However that only works if the library being called is 
*extremely* happy with being reloaded, or the test setup/teardown fixtures make 
sure everything is unloaded nicely. The only way I could make arrow tests work 
is by doing a single call to `pytest.main` for all tests and then streaming the 
results out. 
   
   It's a side effect of how pytest is designed - it is only really designed to 
be called once per interpreter startup. So you can do things in session level 
fixtures that change e.g. C++ library state (e.g. user defined functions in 
arrow), and not worry about whether the changes can be undone, because you know 
that everything will be started from scratch before pytest is run again.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to