@@ -2138,16 +2138,18 @@ def test_gallery(self):
2138
2138
2139
2139
postprocessed_gallery = gallery .postprocess (
2140
2140
[
2141
- ("test/test_files/foo.png" , "foo_caption" ),
2141
+ (str ( Path ( "test/test_files/foo.png" )) , "foo_caption" ),
2142
2142
(Path ("test/test_files/bar.png" ), "bar_caption" ),
2143
- "test/test_files/baz.png" ,
2143
+ str ( Path ( "test/test_files/baz.png" )) ,
2144
2144
Path ("test/test_files/qux.png" ),
2145
2145
]
2146
2146
).model_dump ()
2147
+
2148
+ # Using str(Path(...)) to ensure that the test passes on all platforms
2147
2149
assert postprocessed_gallery == [
2148
2150
{
2149
2151
"image" : {
2150
- "path" : "test/ test_files/ foo.png" ,
2152
+ "path" : str ( Path ( "test" ) / " test_files" / " foo.png") ,
2151
2153
"orig_name" : "foo.png" ,
2152
2154
"mime_type" : None ,
2153
2155
"size" : None ,
@@ -2157,7 +2159,7 @@ def test_gallery(self):
2157
2159
},
2158
2160
{
2159
2161
"image" : {
2160
- "path" : "test/ test_files/ bar.png" ,
2162
+ "path" : str ( Path ( "test" ) / " test_files" / " bar.png") ,
2161
2163
"orig_name" : "bar.png" ,
2162
2164
"mime_type" : None ,
2163
2165
"size" : None ,
@@ -2167,7 +2169,7 @@ def test_gallery(self):
2167
2169
},
2168
2170
{
2169
2171
"image" : {
2170
- "path" : "test/ test_files/ baz.png" ,
2172
+ "path" : str ( Path ( "test" ) / " test_files" / " baz.png") ,
2171
2173
"orig_name" : "baz.png" ,
2172
2174
"mime_type" : None ,
2173
2175
"size" : None ,
@@ -2177,7 +2179,7 @@ def test_gallery(self):
2177
2179
},
2178
2180
{
2179
2181
"image" : {
2180
- "path" : "test/ test_files/ qux.png" ,
2182
+ "path" : str ( Path ( "test" ) / " test_files" / " qux.png") ,
2181
2183
"orig_name" : "qux.png" ,
2182
2184
"mime_type" : None ,
2183
2185
"size" : None ,
0 commit comments