-
Notifications
You must be signed in to change notification settings - Fork 466
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
Tests fail if not 'codespell' installed #3433
Comments
I was unable to find evidence that tests run codespell/codespell_lib/tests/test_basic.py Lines 66 to 73 in 8097264
Perhaps we expect codespell to be installed in dev mode before running the tests. |
This won't work in all cases. e.g. many Linux distros use a clean build environment with precise set of dependencies. Instead expecting |
It makes sense. However, the Development setup does not provide a "newly built binary", apart from the installed one. How to combine both? |
See also #2595. @anatol What do you mean exactly by "newly built binary"? Note that the Lines 60 to 61 in 523b9c5
I understand that setuptools creates the script while installing. If so, it makes sense to install (perhaps in a temporary location) before testing. |
On my workstation, the generated #!/usr/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from codespell_lib import _script_main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(_script_main()) We could of course create and run something similar in our tests instead of running Right now, we haven't heard from Linux manitainers, and therefore haven't got actual feedback about the chicken-egg problem, or how to circumvent it. |
It looks like the project tests use
codespell
from$PATH
rather than from the source tree.I am following Arch linux build instructions. I build the project with
python -m build --wheel --no-isolation
then run tests withpytest
and it fails:The text was updated successfully, but these errors were encountered: