17
17
"format, quality, lossless" ,
18
18
[
19
19
(
20
- tiledb .filter .lt .WebpInputFormat .WEBP_RGB ,
20
+ tiledb .filter .WebpFilter .WebpInputFormat .WEBP_RGB ,
21
21
100.0 ,
22
22
False ,
23
23
), # Test setting format with enum values
24
- (tiledb .filter .lt .WebpInputFormat .WEBP_BGR , 50.0 , True ),
25
- (tiledb .filter .lt .WebpInputFormat .WEBP_RGBA , 25.5 , False ),
24
+ (tiledb .filter .WebpFilter .WebpInputFormat .WEBP_BGR , 50.0 , True ),
25
+ (tiledb .filter .WebpFilter .WebpInputFormat .WEBP_RGBA , 25.5 , False ),
26
26
(4 , 0.0 , True ), # Test setting format with integral type
27
27
],
28
28
)
@@ -31,7 +31,7 @@ def test_webp_ctor(format, quality, lossless):
31
31
input_format = format , quality = quality , lossless = lossless
32
32
)
33
33
np .testing .assert_equal (
34
- webp_filter .input_format , tiledb .filter .lt .WebpInputFormat (format )
34
+ webp_filter .input_format , tiledb .filter .WebpFilter .WebpInputFormat (format )
35
35
)
36
36
np .testing .assert_equal (webp_filter .quality , quality )
37
37
np .testing .assert_equal (webp_filter .lossless , lossless )
@@ -117,16 +117,18 @@ def make_image_data(width, height, pixel_depth):
117
117
@pytest .mark .parametrize (
118
118
"colorspace" ,
119
119
[
120
- tiledb .filter .lt .WebpInputFormat .WEBP_RGB ,
121
- tiledb .filter .lt .WebpInputFormat .WEBP_BGR ,
122
- tiledb .filter .lt .WebpInputFormat .WEBP_RGBA ,
123
- tiledb .filter .lt .WebpInputFormat .WEBP_BGRA ,
120
+ tiledb .filter .WebpFilter .WebpInputFormat .WEBP_RGB ,
121
+ tiledb .filter .WebpFilter .WebpInputFormat .WEBP_BGR ,
122
+ tiledb .filter .WebpFilter .WebpInputFormat .WEBP_RGBA ,
123
+ tiledb .filter .WebpFilter .WebpInputFormat .WEBP_BGRA ,
124
124
],
125
125
)
126
126
@pytest .mark .parametrize ("lossless" , [True , False ])
127
127
def test_webp_filter (width , height , colorspace , lossless ):
128
128
pixel_depth = (
129
- 3 if int (colorspace ) < int (tiledb .filter .lt .WebpInputFormat .WEBP_RGBA ) else 4
129
+ 3
130
+ if int (colorspace ) < int (tiledb .filter .WebpFilter .WebpInputFormat .WEBP_RGBA )
131
+ else 4
130
132
)
131
133
data = make_image_data (width , height , pixel_depth )
132
134
data = np .array (data , dtype = np .uint8 ).reshape (height , width * pixel_depth )
0 commit comments