1616# under the License.
1717import pytest
1818from datetime import timedelta
19- from hypothesis import given , strategies as st
2019import pyarrow as pa
2120try :
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" )])
567571def 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