raulcd commented on PR #13199:
URL: https://github.com/apache/arrow/pull/13199#issuecomment-1132758842
Hi @AlenkaF creating a new job sounds good to me. I have checked out your PR
locally and there are a couple of things that are not clear to me. If I try to
run tests locally with the current setup `python -m pytest
python/pyarrow/tests/` no tests are collected:
```
$ python -m pytest python/pyarrow/tests/
============================================================== test session
starts ===============================================================
platform linux -- Python 3.10.4, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/raulcd/open_source/arrow/python, configfile: setup.cfg
plugins: hypothesis-6.46.3, lazy-fixture-0.6.3
collected 0 items
============================================================= no tests ran
in 0.02s ==============================================================
```
This is because the new conftest skips collecting tests if we are using `
--doctest-modules` which is the default set up.
This is solved if I run tests using: `pytest -r s -v --pyargs pyarrow` but
this is not how we have it documented on the developers guide.
I also have been able to reproduce the same appveyor failure if I remove the
new conftest file, we might require some more investigation:
```
$ mv conftest.py no_conftest.py
$ pytest -r s -v --pyargs pyarrow.tests
...
collected 4239 items / 2 errors / 6 skipped
===================================================================== ERRORS
=====================================================================
______________________________________________ ERROR collecting
pyarrow/tests/deserialize_buffer.py
______________________________________________
tests/deserialize_buffer.py:24: in <module>
with open(sys.argv[1], 'rb') as f:
E FileNotFoundError: [Errno 2] No such file or directory: '-r'
______________________________________________ ERROR collecting
pyarrow/tests/read_record_batch.py
_______________________________________________
tests/read_record_batch.py:26: in <module>
with open(sys.argv[1], 'rb') as f:
E FileNotFoundError: [Errno 2] No such file or directory: '-r'
============================================================ short test
summary info =============================================================
SKIPPED [2] tests/test_cuda.py:32: could not import 'pyarrow.cuda': No
module named 'pyarrow._cuda'
SKIPPED [2] tests/test_cuda_numba_interop.py:23: could not import
'pyarrow.cuda': No module named 'pyarrow._cuda'
SKIPPED [2] tests/test_jvm.py:27: could not import 'jpype': No module named
'jpype'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors
during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
========================================================== 6 skipped, 2
errors in 2.69s ==========================================================
```
I would propose to not add `--doctest-modules` to the default pytest setup,
this also solved the appveyor issue I was able to experience locally.
--
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]