Skip to content

Commit

Permalink
Adding memoryview to secretbox test matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
blast-hardcheese committed Nov 12, 2024
1 parent 263f9c9 commit 00d63de
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import hashlib
from binascii import hexlify, unhexlify
from typing import Callable, List, Tuple
import itertools

from hypothesis import given, settings
from hypothesis.strategies import binary, integers
Expand Down Expand Up @@ -96,13 +97,12 @@ def test_secretbox_easy():

@pytest.mark.parametrize(
("encoder", "decoder"),
[
(bytes, bytearray),
(bytearray, bytes),
(bytearray, bytearray),
],
itertools.product(
[bytes, bytearray, memoryview],
[bytes, bytearray, memoryview],
),
)
def test_secretbox_bytearray(
def test_secretbox_byteslike(
encoder: Callable[[bytes], bytes], decoder: Callable[[bytes], bytes]
):
key = b"\x00" * c.crypto_secretbox_KEYBYTES
Expand Down

0 comments on commit 00d63de

Please sign in to comment.