Open lukpueh opened 2 months ago
Handle the import similarly to how we handle it in other modules. That should do the trick
So what we need to do here is update taf\taf\tests\test_repository_tool\test_repository_tool.py. If you install yubikey-manager dependency, (install taf by running pip install -e .[yubikey] from the root of the repository), you should be able to run this test using pytest. Then, uninstall yubikey-manager: pip uninstall yubikey-manager. You see this error:
ImportError while loading conftest 'D:\oll\taf\taf\tests\test_repository_tool\conftest.py'.
conftest.py:8: in
@fixture def targets_yk(pytestconfig): """Targets YubiKey.""" return TargetYubiKey(KEYSTORE_PATH, pytestconfig.option.signature_scheme) Move everything from test_repository_tool to that a module inside this new package. Then skip the whole module if the dependency is not installed.
I'd expect that running the installation instructions from "Development Setup" would allow to run
pytest
. This is not the case:Installing with
yubikey
extra does the trick:pip install -e .[dev,test,yubikey]
(although the yubikey dependency should probably be part of the test extras, if tests need it)