tests: Skip encrypt_string test when building without OpenSSL

This commit is contained in:
rdb 2023-02-22 23:31:32 +01:00
parent 84ada4d66b
commit 86ceade7b3

View File

@ -1,6 +1,9 @@
from panda3d import core from panda3d import core
import pytest
@pytest.mark.skipif(not hasattr(core, 'encrypt_string'), reason="Requires OpenSSL")
def test_encrypt_string(): def test_encrypt_string():
# Test encrypt and then decrypt cycle # Test encrypt and then decrypt cycle
for algorithm in ('', 'bf-cbc', 'aes-256-cbc'): for algorithm in ('', 'bf-cbc', 'aes-256-cbc'):