1919import pytest
2020from pyroaring import BitMap
2121
22- from pyiceberg .table .puffin import _deserialize_bitmap , PuffinFile , PuffinWriter , PROPERTY_REFERENCED_DATA_FILE
22+ from pyiceberg .table .puffin import PROPERTY_REFERENCED_DATA_FILE , PuffinFile , PuffinWriter , _deserialize_bitmap
2323
2424
2525def _open_file (file : str ) -> bytes :
@@ -73,10 +73,10 @@ def test_map_high_vals() -> None:
7373 _ = _deserialize_bitmap (puffin )
7474
7575
76- def test_puffin_round_trip ():
76+ def test_puffin_round_trip () -> None :
7777 # Define some deletion positions for multiple files
7878 deletions1 = [10 , 20 , 30 ]
79- deletions2 = [5 , (1 << 32 ) + 1 ] # Test with a high-bit position
79+ deletions2 = [5 , (1 << 32 ) + 1 ] # Test with a high-bit position
8080
8181 file1_path = "path/to/data1.parquet"
8282 file2_path = "path/to/data2.parquet"
@@ -92,7 +92,7 @@ def test_puffin_round_trip():
9292
9393 # Assert footer metadata
9494 assert len (reader .footer .blobs ) == 2
95-
95+
9696 blob1_meta = reader .footer .blobs [0 ]
9797 assert blob1_meta .properties [PROPERTY_REFERENCED_DATA_FILE ] == file1_path
9898 assert blob1_meta .properties ["cardinality" ] == str (len (deletions1 ))
@@ -103,15 +103,15 @@ def test_puffin_round_trip():
103103
104104 # Assert the content of deletion vectors
105105 read_vectors = reader .to_vector ()
106-
106+
107107 assert file1_path in read_vectors
108108 assert file2_path in read_vectors
109109
110110 assert read_vectors [file1_path ].to_pylist () == sorted (deletions1 )
111111 assert read_vectors [file2_path ].to_pylist () == sorted (deletions2 )
112112
113113
114- def test_write_and_read_puffin_file ():
114+ def test_write_and_read_puffin_file () -> None :
115115 writer = PuffinWriter ()
116116 writer .add (positions = [1 , 2 , 3 ], referenced_data_file = "file1.parquet" )
117117 writer .add (positions = [4 , 5 , 6 ], referenced_data_file = "file2.parquet" )
@@ -139,7 +139,7 @@ def test_write_and_read_puffin_file():
139139 assert vectors ["file2.parquet" ].to_pylist () == [4 , 5 , 6 ]
140140
141141
142- def test_puffin_file_with_no_blobs ():
142+ def test_puffin_file_with_no_blobs () -> None :
143143 writer = PuffinWriter ()
144144 puffin_bytes = writer .finish ()
145145
0 commit comments