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

cryptography needs to be installed for self tests #3373

Closed
0-wiz-0 opened this issue Jan 28, 2017 · 1 comment
Closed

cryptography needs to be installed for self tests #3373

0-wiz-0 opened this issue Jan 28, 2017 · 1 comment

Comments

@0-wiz-0
Copy link

0-wiz-0 commented Jan 28, 2017

When testing cryptography, it complains:

cd .../cryptography && py.test-3.6
Traceback (most recent call last):
  File "/usr/pkg/lib/python3.6/site-packages/_pytest/config.py", line 325, in _getconftestmodules
    return self._path2confmods[path]
KeyError: local('.../cryptography/tests')

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/pkg/lib/python3.6/site-packages/_pytest/config.py", line 356, in _importconftest
    return self._conftestpath2mod[conftestpath]
KeyError: local('.../cryptography/tests/conftest.py')

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/pkg/lib/python3.6/site-packages/_pytest/config.py", line 362, in _importconftest
    mod = conftestpath.pyimport()
  File "/usr/pkg/lib/python3.6/site-packages/py/_path/local.py", line 650, in pyimport
    __import__(modname)
  File "/usr/pkg/lib/python3.6/site-packages/_pytest/assertion/rewrite.py", line 216, in load_module
    py.builtin.exec_(co, mod.__dict__)
  File ".../cryptography/tests/conftest.py", line 9, in <module>
    from cryptography.hazmat.backends import _available_backends
ModuleNotFoundError: No module named 'cryptography'
ERROR: could not load .../cryptography/tests/conftest.py

It would be great if one could test it before installing it.

@reaperhulk
Copy link
Member

This is unlikely to change any time soon. If someone has a proposal for how to make this possible without causing a regression in our testing strategies, etc then feel free to open an issue to discuss it. We're inside a src dir partially to prevent Python from picking up the non-installed version because we want to test against what actually gets installed. Since Python sdist/wheels are created from what you list in your setup.py and MANIFEST.in it is possible to have bugs like failing to include files in your installed package. Without testing directly against the installed version CI will miss bugs like that.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants