ofajardo/pyreadr

fail to run tests due to missing import pyreadr

hubutui opened this issue · 5 comments

https://github.com/ofajardo/pyreadr/blob/eabf926ca47b46aeb7df9dfb0853225727cdc864/tests/test_basic.py
It seems you forget to add this line:

import pyreadr

which leads to a lot of xxx not defined error when we run pytest -v after building it.

ok, it seems I should run python tests/test_basic.py, not pytest -v

yes, that's the intention. I will add a line as a comment on the test_basic.py script on how it should be run. Would that be enough?

Yes, that's great. We could add it to README.md.

BTW, I notice a lot of warning:

/build/python-pyreadr/src/pyreadr-0.4.0/tests/test_basic.py:32: DeprecationWarning: `np.object` is a deprecated alias for the builti
n `object`. To silence this warning, use `object` by itself. Doing this will not modify any behavior and is safe.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  'int': np.object,

You might wanna consider this message for future updates.

thanks for flagging it, I will review the script to get rid of these warnings

readme updated with how to test and warnings fixed in version 0.4.1