Skip to content

Commit

Permalink
fix a few markers
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasertl committed Dec 27, 2024
1 parent 9dfa6bd commit d17d4af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def pytest_collection_modifyitems(items) -> None:
IS_SOFTHSM, reason="Expected failure with SoftHSMvs.", strict=True
)
)
if "xfail_opencryptoki" in markers:
if "xfail_opencryptoki" in markers and IS_OPENCRYPTOKI:
item.add_marker(
pytest.mark.xfail(
IS_OPENCRYPTOKI, reason="Expected failure with OpenCryptoki.", strict=True
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def test_destroy_object(token: pkcs11.Token, pin: str) -> None:
assert list(session.get_objects()) == []


@pytest.mark.skipif(IS_NFAST, reason="nFast won't destroy objects.")
@pytest.mark.skipif(not IS_SOFTHSM, reason="Unknown reason.")
def test_copy_object(token: pkcs11.Token, pin: str) -> None:
with token.open(user_pin=pin) as session:
key = session.generate_key(pkcs11.KeyType.AES, 128, label="SAMPLE KEY")
Expand Down

0 comments on commit d17d4af

Please sign in to comment.