aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/lz4/py2/tests/frame/conftest.py
diff options
context:
space:
mode:
authorvitalyisaev <vitalyisaev@ydb.tech>2023-11-14 09:58:56 +0300
committervitalyisaev <vitalyisaev@ydb.tech>2023-11-14 10:20:20 +0300
commitc2b2dfd9827a400a8495e172a56343462e3ceb82 (patch)
treecd4e4f597d01bede4c82dffeb2d780d0a9046bd0 /contrib/python/lz4/py2/tests/frame/conftest.py
parentd4ae8f119e67808cb0cf776ba6e0cf95296f2df7 (diff)
downloadydb-c2b2dfd9827a400a8495e172a56343462e3ceb82.tar.gz
YQ Connector: move tests from yql to ydb (OSS)
Перенос папки с тестами на Коннектор из папки yql в папку ydb (синхронизируется с github).
Diffstat (limited to 'contrib/python/lz4/py2/tests/frame/conftest.py')
-rw-r--r--contrib/python/lz4/py2/tests/frame/conftest.py95
1 files changed, 95 insertions, 0 deletions
diff --git a/contrib/python/lz4/py2/tests/frame/conftest.py b/contrib/python/lz4/py2/tests/frame/conftest.py
new file mode 100644
index 0000000000..5ab52c0ada
--- /dev/null
+++ b/contrib/python/lz4/py2/tests/frame/conftest.py
@@ -0,0 +1,95 @@
+import pytest
+import lz4.frame as lz4frame
+import lz4
+
+
+@pytest.fixture(
+ params=[
+ # (lz4frame.BLOCKSIZE_DEFAULT),
+ (lz4frame.BLOCKSIZE_MAX64KB),
+ (lz4frame.BLOCKSIZE_MAX256KB),
+ (lz4frame.BLOCKSIZE_MAX1MB),
+ (lz4frame.BLOCKSIZE_MAX4MB),
+ ]
+)
+def block_size(request):
+ return request.param
+
+
+@pytest.fixture(
+ params=[
+ (True),
+ (False),
+ ]
+)
+def block_linked(request):
+ return request.param
+
+
+@pytest.fixture(
+ params=[
+ (True),
+ (False),
+ ]
+)
+def content_checksum(request):
+ return request.param
+
+
+if lz4.library_version_number() >= 10800:
+ p = [True, False]
+else:
+ p = [False, ]
+
+
+@pytest.fixture(
+ params=[
+ (pp) for pp in p
+ ]
+)
+def block_checksum(request):
+ return request.param
+
+
+compression_levels = [
+ (lz4frame.COMPRESSIONLEVEL_MIN),
+ (lz4frame.COMPRESSIONLEVEL_MINHC),
+ (lz4frame.COMPRESSIONLEVEL_MAX),
+]
+
+
+@pytest.fixture(
+ params=compression_levels
+)
+def compression_level(request):
+ return request.param
+
+
+@pytest.fixture(
+ params=[
+ (True),
+ (False)
+ ]
+)
+def auto_flush(request):
+ return request.param
+
+
+@pytest.fixture(
+ params=[
+ (True),
+ (False)
+ ]
+)
+def store_size(request):
+ return request.param
+
+
+@pytest.fixture(
+ params=[
+ (True),
+ (False),
+ ]
+)
+def return_bytearray(request):
+ return request.param