Enable bytearray and memoryview tests
@@ -9,14 +9,14 @@ test_data=[
(b''),
(os.urandom(8 * 1024)),
(b'0' * 8 * 1024),
- # (bytearray(b'')),
- # (bytearray(os.urandom(8 * 1024))),
+ (bytearray(b'')),
+ (bytearray(os.urandom(8 * 1024))),
+]
+if sys.version_info > (2, 7):
+ test_data += [
+ (memoryview(b'')),
+ (memoryview(os.urandom(8 * 1024)))
]
-# if sys.version_info > (2, 7):
-# test_data += [
-# (memoryview(b'')),
-# (memoryview(os.urandom(8 * 1024)))
-# ]
@pytest.fixture(
params=test_data,
@@ -34,14 +34,14 @@ test_data_chunked=[
(os.urandom(8 * 1024), 1, 8),
(b'0' * 8 * 1024, 8, 1),
(b'0' * 8 * 1024, 8, 1),
- # (bytearray(b'')),
- # (bytearray(os.urandom(8 * 1024))),
+ (bytearray(b''), 1, 1),
+ (bytearray(os.urandom(8 * 1024)), 8, 1),
+]
+if sys.version_info > (2, 7):
+ test_data_chunked += [
+ (memoryview(b''), 1, 1),
+ (memoryview(os.urandom(8 * 1024)), 8, 1)
]
-# if sys.version_info > (2, 7):
-# test_data += [
-# (memoryview(b'')),
-# (memoryview(os.urandom(8 * 1024)))
-# ]
@pytest.fixture(
params=test_data_chunked,
