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

let pytest and pytype know about pycoq.so somehow, probably by doing some kind of dune exec -- pytest #14

Open
quinn-dougherty opened this issue Nov 5, 2021 · 1 comment

Comments

@quinn-dougherty
Copy link
Collaborator

In #10 I decided to put if __name__ == "__main__": blocks in the test suite, instead of using test harness pytest, because I couldn't make pytest aware of the pycoq installation.

we also have to cp -r test _build/default/, which isn't ideal. But it's the minimum viable test suite.

Errors:

$ pytest test
======================================================= ERRORS =======================================================
_______________________________________ ERROR collecting test/py/test_spec.py ________________________________________
test/py/test_spec.py:1: in <module>
    import pycoq
pycoq/__init__.py:9: in <module>
    dll = PyDLL(f"{curdir}/pycoq.so", RTLD_GLOBAL)
/usr/lib/python3.8/ctypes/__init__.py:373: in __init__
    self._handle = _dlopen(self._name, mode)
E   OSError: /home/quinn/Dropbox/Projects/misc-coq/pycoq/pycoq/pycoq.so: cannot open shared object file: No such file or directory
============================================== short test summary info ===============================================

pytest _build/default/test is weirder, the harness says collecting... then returns me back to the shell, collecting nothing.

I also experimented with the --rootdir argument to point pytest to pycoq.so, no luck.

@quinn-dougherty
Copy link
Collaborator Author

tox might be the correct way around it, it's a little more modern than setuptools anyway.

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

No branches or pull requests

1 participant