@@ -85,27 +85,27 @@ def test_locate_file_valid_paths1(self):
85
85
"""Test that `config.locate_file` works with absolute paths."""
86
86
config_abs_path = config_dir / "test_config_parsing_relative_path1.cfg"
87
87
open (config_abs_path , "w" ).close ()
88
- computed_path = locate_file (config_abs_path , tests_dir )
89
- expected_path = str ( config_dir / "test_config_parsing_relative_path1.cfg" )
90
- self .assertEqual (Path ( computed_path ) .resolve (), Path ( expected_path ) .resolve ())
88
+ computed_path = Path ( locate_file (config_abs_path , tests_dir ) )
89
+ expected_path = config_dir / "test_config_parsing_relative_path1.cfg"
90
+ self .assertEqual (computed_path .resolve (), expected_path .resolve ())
91
91
92
92
def test_locate_file_valid_paths2 (self ):
93
93
"""Test that `config.locate_file` works with relative paths."""
94
94
config_abs_path = config_dir / "test_config_parsing_relative_path2.cfg"
95
95
config_rel_path = "configs/test_config_parsing_relative_path2.cfg"
96
96
open (config_abs_path , "w" ).close ()
97
- computed_path = locate_file (config_rel_path , tests_dir )
98
- expected_path = str ( config_abs_path )
99
- self .assertEqual (Path ( computed_path ) .resolve (), Path ( expected_path ) .resolve ())
97
+ computed_path = Path ( locate_file (config_rel_path , tests_dir ) )
98
+ expected_path = config_abs_path
99
+ self .assertEqual (computed_path .resolve (), expected_path .resolve ())
100
100
101
101
def test_locate_file_valid_paths3 (self ):
102
102
"""Test that `config.locate_file` works with relative/absolute paths."""
103
103
config_abs_path = config_dir / "test_config_parsing_relative_path3.cfg"
104
104
config_rel_path = "configs/test_config_parsing_relative_path3.cfg"
105
105
open (config_abs_path , "w" ).close ()
106
- computed_path = locate_file (config_abs_path , tests_dir )
107
- expected_path = locate_file (config_rel_path , tests_dir )
108
- self .assertEqual (Path ( computed_path ) .resolve (), Path ( expected_path ) .resolve ())
106
+ computed_path = Path ( locate_file (config_abs_path , tests_dir ) )
107
+ expected_path = Path ( locate_file (config_rel_path , tests_dir ) )
108
+ self .assertEqual (computed_path .resolve (), expected_path .resolve ())
109
109
110
110
def test_locate_file_invalid_path (self ):
111
111
"""Test that `config.locate_file` raises error for paths that do not exist."""
0 commit comments