balena / python-smime

S/MIME encoder in pure python
Apache License 2.0
18 stars 17 forks source link

How to run the tests #11

Closed frennkie closed 4 years ago

frennkie commented 4 years ago

I have seen that the are tests - but how are they supposed to run?

Running python setup.py test gives me:

[...]
=================================================================================================== ERRORS ===================================================================================================
_______________________________________________________________________________________ ERROR collecting test session ________________________________________________________________________________________
Defining 'pytest_plugins' in a non-top-level conftest is no longer supported:
It affects the entire test suite instead of just below the conftest as expected.
  /home/robbie/work/python-smime/smime/tests/conftest.py
Please move it to a top level conftest file at the rootdir:
  /home/robbie/work/python-smime
For more information, visit:
  https://docs.pytest.org/en/latest/deprecations.html#pytest-plugins-in-non-top-level-conftest-files
========================================================================================== short test summary info ===========================================================================================
ERROR
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================================== 1 error in 0.15s ==================================================================

And python -m pytest smime/encrypt_test.py

[...]
$: python -m pytest smime/encrypt_test.py -v
============================================================================================ test session starts =============================================================================================
platform linux -- Python 3.5.2, pytest-5.4.0, py-1.8.1, pluggy-0.13.1 -- /home/user/work/python-smime/venv/bin/python
cachedir: .pytest_cache
rootdir: /home/robbie/work/python-smime, inifile: setup.cfg
collected 3 items

smime/encrypt_test.py::EncryptTest::test_message_to_carl_aes128_cbc FAILED                                                                                                                             [ 33%]
smime/encrypt_test.py::EncryptTest::test_message_to_carl_aes192_cbc FAILED                                                                                                                             [ 66%]
smime/encrypt_test.py::EncryptTest::test_message_to_carl_aes256_cbc FAILED                                                                                                                             [100%]

================================================================================================== FAILURES ==================================================================================================
________________________________________________________________________________ EncryptTest.test_message_to_carl_aes128_cbc _________________________________________________________________________________

self = <smime.encrypt_test.EncryptTest testMethod=test_message_to_carl_aes128_cbc>
[...]