Skip to content

Commit

Permalink
TST: do not skip tests if cryptography installed
Browse files Browse the repository at this point in the history
  • Loading branch information
exiledkingcc committed Jul 22, 2023
1 parent ac107d5 commit 860b9d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_encryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def test_encryption(name, requires_pycryptodome):
("r6-both-passwords.pdf", "foo", "bar"),
],
)
@pytest.mark.skipif(not HAS_PYCRYPTODOME, reason="No pycryptodome")
@pytest.mark.skipif(not HAS_PYCRYPTODOME and not HAS_CRYPTOGRAPHY, reason="No pycryptodome / cryptography")
def test_pdf_with_both_passwords(name, user_passwd, owner_passwd):
"""
PDFs with both user and owner passwords are handled correctly.
Expand All @@ -151,7 +151,7 @@ def test_pdf_with_both_passwords(name, user_passwd, owner_passwd):
("crazyones-encrypted-256.pdf", b"password"),
],
)
@pytest.mark.skipif(not HAS_PYCRYPTODOME, reason="No pycryptodome")
@pytest.mark.skipif(not HAS_PYCRYPTODOME and not HAS_CRYPTOGRAPHY, reason="No pycryptodome / cryptography")
def test_read_page_from_encrypted_file_aes_256(pdffile, password):
"""
A page can be read from an encrypted.
Expand All @@ -176,7 +176,7 @@ def test_read_page_from_encrypted_file_aes_256(pdffile, password):
),
],
)
@pytest.mark.skipif(not HAS_PYCRYPTODOME, reason="No pycryptodome")
@pytest.mark.skipif(not HAS_PYCRYPTODOME and not HAS_CRYPTOGRAPHY, reason="No pycryptodome / cryptography")
@pytest.mark.filterwarnings("ignore::DeprecationWarning")
def test_merge_encrypted_pdfs(names):
"""Encrypted PDFs can be merged after decryption."""
Expand Down

0 comments on commit 860b9d1

Please sign in to comment.