Skip to content

Commit 2029cf1

Browse files
committed
Fix unrelated CLI test
Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
1 parent 94da6c4 commit 2029cf1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/scancode/test_cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

190190
def test_scan_info_returns_does_not_strip_root_with_single_file():

0 commit comments

Comments
 (0)