File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,8 +167,8 @@ def test_scan_info_returns_full_root():
167167 result_data = json .loads (open (result_file ).read ())
168168 file_paths = [f ['path' ] for f in result_data ['files' ]]
169169 assert len (file_paths ) == 12
170- # note that we strip paths from leading and trailing slashes
171- root = fileutils .as_posixpath (test_dir ).strip ('/' )
170+ # note that we strip paths from trailing slashes
171+ root = fileutils .as_posixpath (test_dir ).rstrip ('/' )
172172 assert all (p .startswith (root ) for p in file_paths )
173173
174174
@@ -184,7 +184,7 @@ def test_scan_info_returns_correct_full_root_with_single_file():
184184 scanned_file = files [0 ]
185185 # and we check that the path is the full path without repeating the file name
186186 # note that the path never contain leading and trailing slashes
187- assert scanned_file ['path' ] == fileutils .as_posixpath (test_file ).strip ('/' )
187+ assert scanned_file ['path' ] == fileutils .as_posixpath (test_file ).rstrip ('/' )
188188
189189
190190def test_scan_info_returns_does_not_strip_root_with_single_file ():
You can’t perform that action at this time.
0 commit comments