Skip to content

Commit c7cb646

Browse files
committed
Changed encryption key rotation test to parameterized
1 parent 6477931 commit c7cb646

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

python/pyarrow/tests/parquet/test_encryption.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
# under the License.
1717
import pytest
1818
from datetime import timedelta
19-
from hypothesis import given, strategies as st
2019
import pyarrow as pa
2120
try:
2221
import pyarrow.parquet as pq
@@ -563,7 +562,12 @@ def test_encrypted_parquet_write_read_external(tempdir, data_table,
563562
assert data_table.equals(result_table)
564563

565564

566-
@given(double_wrap_initial=st.booleans(), double_wrap_rotated=st.booleans())
565+
@pytest.mark.parametrize(
566+
("double_wrap_initial", "double_wrap_rotated"), [
567+
pytest.param(True, True, id="double wrapping"),
568+
pytest.param(False, True, id="single to double wrapped"),
569+
pytest.param(True, False, id="double to singe wrapped"),
570+
pytest.param(False, False, id="single wrapping")])
567571
def test_external_key_material_rotation(
568572
reusable_tempdir,
569573
data_table,
@@ -576,11 +580,7 @@ def test_external_key_material_rotation(
576580
EncryptionConfig.double_wrapping was set to true (also the default) when
577581
the external key material store was written. This means double wrapping may
578582
be set one way initially and then applied or removed during rotation.
579-
When run as a regular pytest test, this function tests the default
580-
scenario - double_wrapping before and after rotation.
581-
582-
A separate wrapper test function below is driven by hypothesis strategies
583-
to run through the permutations."""
583+
"""
584584
path = reusable_tempdir / PARQUET_NAME
585585
encryption_config = pe.EncryptionConfiguration(
586586
footer_key=FOOTER_KEY_NAME,

0 commit comments

Comments
 (0)