Skip to content

Commit 00d63de

Browse files
Adding memoryview to secretbox test matrix
1 parent 263f9c9 commit 00d63de

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/test_bindings.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import hashlib
1717
from binascii import hexlify, unhexlify
1818
from typing import Callable, List, Tuple
19+
import itertools
1920

2021
from hypothesis import given, settings
2122
from hypothesis.strategies import binary, integers
@@ -96,13 +97,12 @@ def test_secretbox_easy():
9697

9798
@pytest.mark.parametrize(
9899
("encoder", "decoder"),
99-
[
100-
(bytes, bytearray),
101-
(bytearray, bytes),
102-
(bytearray, bytearray),
103-
],
100+
itertools.product(
101+
[bytes, bytearray, memoryview],
102+
[bytes, bytearray, memoryview],
103+
),
104104
)
105-
def test_secretbox_bytearray(
105+
def test_secretbox_byteslike(
106106
encoder: Callable[[bytes], bytes], decoder: Callable[[bytes], bytes]
107107
):
108108
key = b"\x00" * c.crypto_secretbox_KEYBYTES

0 commit comments

Comments
 (0)