@@ -612,7 +612,7 @@ fn extend_passed_via_config_argument() {
612612#[ test]
613613fn nonexistent_extend_file ( ) -> Result < ( ) > {
614614 let tempdir = TempDir :: new ( ) ?;
615- let project_dir = tempdir. path ( ) . canonicalize ( ) ?;
615+ let project_dir = dunce :: canonicalize ( tempdir. path ( ) ) ?;
616616 fs:: write (
617617 project_dir. join ( "ruff.toml" ) ,
618618 r#"
@@ -653,7 +653,7 @@ extend = "ruff3.toml"
653653#[ test]
654654fn circular_extend ( ) -> Result < ( ) > {
655655 let tempdir = TempDir :: new ( ) ?;
656- let project_path = tempdir. path ( ) . canonicalize ( ) ?;
656+ let project_path = dunce :: canonicalize ( tempdir. path ( ) ) ?;
657657
658658 fs:: write (
659659 project_path. join ( "ruff.toml" ) ,
@@ -698,7 +698,7 @@ extend = "ruff.toml"
698698#[ test]
699699fn parse_error_extends ( ) -> Result < ( ) > {
700700 let tempdir = TempDir :: new ( ) ?;
701- let project_path = tempdir. path ( ) . canonicalize ( ) ?;
701+ let project_path = dunce :: canonicalize ( tempdir. path ( ) ) ?;
702702
703703 fs:: write (
704704 project_path. join ( "ruff.toml" ) ,
@@ -2130,7 +2130,7 @@ select = ["UP006"]
21302130#[ test]
21312131fn requires_python_no_tool ( ) -> Result < ( ) > {
21322132 let tempdir = TempDir :: new ( ) ?;
2133- let project_dir = tempdir. path ( ) . canonicalize ( ) ?;
2133+ let project_dir = dunce :: canonicalize ( tempdir. path ( ) ) ?;
21342134 let ruff_toml = tempdir. path ( ) . join ( "pyproject.toml" ) ;
21352135 fs:: write (
21362136 & ruff_toml,
@@ -2441,7 +2441,7 @@ requires-python = ">= 3.11"
24412441#[ test]
24422442fn requires_python_no_tool_target_version_override ( ) -> Result < ( ) > {
24432443 let tempdir = TempDir :: new ( ) ?;
2444- let project_dir = tempdir. path ( ) . canonicalize ( ) ?;
2444+ let project_dir = dunce :: canonicalize ( tempdir. path ( ) ) ?;
24452445 let ruff_toml = tempdir. path ( ) . join ( "pyproject.toml" ) ;
24462446 fs:: write (
24472447 & ruff_toml,
@@ -2752,7 +2752,7 @@ requires-python = ">= 3.11"
27522752#[ test]
27532753fn requires_python_no_tool_with_check ( ) -> Result < ( ) > {
27542754 let tempdir = TempDir :: new ( ) ?;
2755- let project_dir = tempdir. path ( ) . canonicalize ( ) ?;
2755+ let project_dir = dunce :: canonicalize ( tempdir. path ( ) ) ?;
27562756 let ruff_toml = tempdir. path ( ) . join ( "pyproject.toml" ) ;
27572757 fs:: write (
27582758 & ruff_toml,
@@ -2797,7 +2797,7 @@ requires-python = ">= 3.11"
27972797#[ test]
27982798fn requires_python_ruff_toml_no_target_fallback ( ) -> Result < ( ) > {
27992799 let tempdir = TempDir :: new ( ) ?;
2800- let project_dir = tempdir. path ( ) . canonicalize ( ) ?;
2800+ let project_dir = dunce :: canonicalize ( tempdir. path ( ) ) ?;
28012801 let ruff_toml = tempdir. path ( ) . join ( "ruff.toml" ) ;
28022802 fs:: write (
28032803 & ruff_toml,
@@ -3118,7 +3118,7 @@ from typing import Union;foo: Union[int, str] = 1
31183118#[ test]
31193119fn requires_python_ruff_toml_no_target_fallback_check ( ) -> Result < ( ) > {
31203120 let tempdir = TempDir :: new ( ) ?;
3121- let project_dir = tempdir. path ( ) . canonicalize ( ) ?;
3121+ let project_dir = dunce :: canonicalize ( tempdir. path ( ) ) ?;
31223122 let ruff_toml = tempdir. path ( ) . join ( "ruff.toml" ) ;
31233123 fs:: write (
31243124 & ruff_toml,
@@ -3173,7 +3173,7 @@ from typing import Union;foo: Union[int, str] = 1
31733173#[ test]
31743174fn requires_python_pyproject_toml_above ( ) -> Result < ( ) > {
31753175 let tempdir = TempDir :: new ( ) ?;
3176- let project_dir = tempdir. path ( ) . canonicalize ( ) ?;
3176+ let project_dir = dunce :: canonicalize ( tempdir. path ( ) ) ?;
31773177 let outer_pyproject = tempdir. path ( ) . join ( "pyproject.toml" ) ;
31783178 fs:: write (
31793179 & outer_pyproject,
@@ -3200,7 +3200,7 @@ from typing import Union;foo: Union[int, str] = 1
32003200"# ,
32013201 ) ?;
32023202
3203- let testpy_canon = testpy . canonicalize ( ) ?;
3203+ let testpy_canon = dunce :: canonicalize ( testpy ) ?;
32043204
32053205 insta:: with_settings!( {
32063206 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" ) ]
@@ -3499,7 +3499,7 @@ from typing import Union;foo: Union[int, str] = 1
34993499#[ test]
35003500fn requires_python_pyproject_toml_above_with_tool ( ) -> Result < ( ) > {
35013501 let tempdir = TempDir :: new ( ) ?;
3502- let project_dir = tempdir. path ( ) . canonicalize ( ) ?;
3502+ let project_dir = dunce :: canonicalize ( tempdir. path ( ) ) ?;
35033503 let outer_pyproject = tempdir. path ( ) . join ( "pyproject.toml" ) ;
35043504 fs:: write (
35053505 & outer_pyproject,
@@ -3528,7 +3528,7 @@ from typing import Union;foo: Union[int, str] = 1
35283528"# ,
35293529 ) ?;
35303530
3531- let testpy_canon = testpy . canonicalize ( ) ?;
3531+ let testpy_canon = dunce :: canonicalize ( testpy ) ?;
35323532
35333533 insta:: with_settings!( {
35343534 filters => vec![ ( tempdir_filter( & testpy_canon) . as_str( ) , "[TMP]/foo/test.py" ) , ( tempdir_filter( & project_dir) . as_str( ) , "[TMP]/" ) , ( r"foo\\" , "foo/" ) ]
@@ -3827,7 +3827,7 @@ from typing import Union;foo: Union[int, str] = 1
38273827#[ test]
38283828fn requires_python_ruff_toml_above ( ) -> Result < ( ) > {
38293829 let tempdir = TempDir :: new ( ) ?;
3830- let project_dir = tempdir. path ( ) . canonicalize ( ) ?;
3830+ let project_dir = dunce :: canonicalize ( tempdir. path ( ) ) ?;
38313831 let ruff_toml = tempdir. path ( ) . join ( "ruff.toml" ) ;
38323832 fs:: write (
38333833 & ruff_toml,
@@ -3856,7 +3856,7 @@ from typing import Union;foo: Union[int, str] = 1
38563856"# ,
38573857 ) ?;
38583858
3859- let testpy_canon = testpy . canonicalize ( ) ?;
3859+ let testpy_canon = dunce :: canonicalize ( testpy ) ?;
38603860
38613861 insta:: with_settings!( {
38623862 filters => vec![ ( tempdir_filter( & testpy_canon) . as_str( ) , "[TMP]/foo/test.py" ) , ( tempdir_filter( & project_dir) . as_str( ) , "[TMP]/" ) ]
@@ -4441,7 +4441,7 @@ from typing import Union;foo: Union[int, str] = 1
44414441#[ test]
44424442fn requires_python_extend_from_shared_config ( ) -> Result < ( ) > {
44434443 let tempdir = TempDir :: new ( ) ?;
4444- let project_dir = tempdir. path ( ) . canonicalize ( ) ?;
4444+ let project_dir = dunce :: canonicalize ( tempdir. path ( ) ) ?;
44454445 let ruff_toml = tempdir. path ( ) . join ( "ruff.toml" ) ;
44464446 fs:: write (
44474447 & ruff_toml,
@@ -4479,7 +4479,7 @@ from typing import Union;foo: Union[int, str] = 1
44794479"# ,
44804480 ) ?;
44814481
4482- let testpy_canon = testpy . canonicalize ( ) ?;
4482+ let testpy_canon = dunce :: canonicalize ( testpy ) ?;
44834483
44844484 insta:: with_settings!( {
44854485 filters => vec![ ( tempdir_filter( & testpy_canon) . as_str( ) , "[TMP]/test.py" ) , ( tempdir_filter( & project_dir) . as_str( ) , "[TMP]/" ) ]
0 commit comments