@@ -2226,8 +2226,10 @@ from typing import Union;foo: Union[int, str] = 1
2226
2226
"# ,
2227
2227
) ?;
2228
2228
2229
+ let testpy_canon = testpy. canonicalize ( ) ?;
2230
+
2229
2231
insta:: with_settings!( {
2230
- filters => vec![ ( tempdir_filter( & project_dir) . as_str( ) , "[TMP]/" ) , ( r"(?m)\n.*\[ruff::commands::check\].*$" , "" ) , ( r"(?m)^.*(\[.*\])\[DEBUG\](.*)$" , "$1[DEBUG]$2" ) ]
2232
+ filters => vec![ ( tempdir_filter( & testpy_canon ) . as_str ( ) , "[TMP]/foo/test.py" ) , ( tempdir_filter ( & project_dir) . as_str( ) , "[TMP]/" ) , ( r"(?m)^foo\\test" , "foo/test ") , ( r"(?m)\n.*\[ruff::commands::check\].*$" , "" ) , ( r"(?m)^.*(\[.*\])\[DEBUG\](.*)$" , "$1[DEBUG]$2" ) ]
2231
2233
} , {
2232
2234
assert_cmd_snapshot!( Command :: new( get_cargo_bin( BIN_NAME ) )
2233
2235
. args( STDIN_BASE_OPTIONS )
@@ -2291,8 +2293,10 @@ from typing import Union;foo: Union[int, str] = 1
2291
2293
"# ,
2292
2294
) ?;
2293
2295
2296
+ let testpy_canon = testpy. canonicalize ( ) ?;
2297
+
2294
2298
insta:: with_settings!( {
2295
- filters => vec![ ( tempdir_filter( & project_dir) . as_str( ) , "[TMP]/" ) , ( r"(?m)\n.*\[ruff::commands::check\].*$" , "" ) , ( r"(?m)^.*(\[.*\])\[DEBUG\](.*)$" , "$1[DEBUG]$2" ) ]
2299
+ filters => vec![ ( tempdir_filter( & testpy_canon ) . as_str ( ) , "[TMP]/foo/test.py" ) , ( tempdir_filter ( & project_dir) . as_str( ) , "[TMP]/" ) , ( r"(?m)\n.*\[ruff::commands::check\].*$" , "" ) , ( r"(?m)^.*(\[.*\])\[DEBUG\](.*)$" , "$1[DEBUG]$2" ) ]
2296
2300
} , {
2297
2301
assert_cmd_snapshot!( Command :: new( get_cargo_bin( BIN_NAME ) )
2298
2302
. args( STDIN_BASE_OPTIONS )
@@ -2313,7 +2317,7 @@ from typing import Union;foo: Union[int, str] = 1
2313
2317
} ) ;
2314
2318
2315
2319
insta:: with_settings!( {
2316
- filters => vec![ ( tempdir_filter( & project_dir) . as_str( ) , "[TMP]/" ) , ( r"(?m)\n.*\[ruff::commands::check\].*$" , "" ) , ( r"(?m)^.*(\[.*\])\[DEBUG\](.*)$" , "$1[DEBUG]$2" ) ]
2320
+ filters => vec![ ( tempdir_filter( & testpy_canon ) . as_str ( ) , "[TMP]/foo/test.py" ) , ( tempdir_filter ( & project_dir) . as_str( ) , "[TMP]/" ) , ( r"(?m)\n.*\[ruff::commands::check\].*$" , "" ) , ( r"(?m)^.*(\[.*\])\[DEBUG\](.*)$" , "$1[DEBUG]$2" ) ]
2317
2321
} , {
2318
2322
assert_cmd_snapshot!( Command :: new( get_cargo_bin( BIN_NAME ) )
2319
2323
. args( STDIN_BASE_OPTIONS )
0 commit comments