Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] Fix doc for PyArrow unit tests dependant on module path #32027

Closed
asfimport opened this issue May 28, 2022 · 3 comments
Closed

[Python] Fix doc for PyArrow unit tests dependant on module path #32027

asfimport opened this issue May 28, 2022 · 3 comments

Comments

@asfimport
Copy link
Collaborator

The PyArrow dev docs currently gives

python -m pytest arrow/python/pyarrow

as the unit-testing command, however there are some unit tests (see list at the bottom) that currently fail because they depend on the "arrow/python" directory being included in the module path whereas it includes instead the current directory - see example below.

 

The fix should be either in the unit tests, to avoid the dependency on the current directory being in the module path, or in the documentation, to instruct that the unit tests should be run from the "arrow/python" directory.

As example for a failed test, for

python -m pytest arrow/python/pyarrow/tests/test_misc.py::test_runtime_info

I'm getting an error with this tail:

 


Traceback (most recent call last):
  File "<string>", line 2, in <module>
ModuleNotFoundError: No module named 'pyarrow'
========================================================================================= short test summary info ==========================================================================================
FAILED arrow/python/pyarrow/tests/test_misc.py::test_runtime_info - subprocess.CalledProcessError: Command '['/mnt/soft1/tscontract/pkg/miniconda3/envs/pyarrow-dev/bin/python', '-c', "if 1:\n          ...

Here is the list of unit tests I'm getting a similar error:

 

 


test_memory.py::test_env_var
test_memory.py::test_debug_memory_pool_abort[default_memory_pool]
test_memory.py::test_debug_memory_pool_abort[jemalloc_memory_pool]
test_memory.py::test_debug_memory_pool_abort[system_memory_pool]
test_memory.py::test_debug_memory_pool_trap[default_memory_pool]
test_memory.py::test_debug_memory_pool_trap[jemalloc_memory_pool]
test_memory.py::test_debug_memory_pool_trap[system_memory_pool]
test_memory.py::test_debug_memory_pool_warn[default_memory_pool]
test_memory.py::test_debug_memory_pool_warn[jemalloc_memory_pool]
test_memory.py::test_debug_memory_pool_warn[system_memory_pool]
test_memory.py::test_debug_memory_pool_disabled[default_memory_pool]
test_memory.py::test_debug_memory_pool_disabled[jemalloc_memory_pool]
test_memory.py::test_debug_memory_pool_disabled[system_memory_pool]
test_misc.py::test_env_var_io_thread_count
test_misc.py::test_runtime_info

 

Reporter: Yaron Gvili / @rtpsw
Assignee: Yaron Gvili / @rtpsw

PRs and other links:

Note: This issue was originally created as ARROW-16681. Please see the migration documentation for further details.

@asfimport
Copy link
Collaborator Author

Yaron Gvili / @rtpsw:
cc @lidavidm - making sure this is noticed.

@asfimport
Copy link
Collaborator Author

David Li / @lidavidm:
@rtpsw would you like to submit a PR for the docs?

@asfimport
Copy link
Collaborator Author

David Li / @lidavidm:
Issue resolved by pull request 13318
#13318

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant