Skip to content

Commit 63d72cf

Browse files
Fix test failures
Signed-off-by: Ayan Sinha Mahapatra <asmahapatra@aboutcode.org>
1 parent af566f2 commit 63d72cf

4 files changed

Lines changed: 26 additions & 31 deletions

File tree

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ charset-normalizer==3.4.2
1111
click==8.3.0;python_version>='3.10'
1212
click==8.1.7;python_version<'3.10'
1313
colorama==0.4.6
14-
commoncode==32.4.0
14+
commoncode==32.4.2
1515
construct==2.10.70
1616
container-inspector==33.0.0
1717
cryptography==45.0.4

tests/scancode/data/help/help.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ Usage: scancode [OPTIONS] <OUTPUT FORMAT OPTION(s)> <input>...
88
Options:
99

1010
primary scans:
11-
-l, --license Scan <input> for licenses.
12-
-p, --package Scan <input> for application package and dependency
13-
manifests, lockfiles and related data.
14-
--system-package Scan <input> for installed system package databases.
11+
-l, --license Scan <input> for licenses.
12+
-p, --package Scan <input> for application package and dependency
13+
manifests, lockfiles and related data.
14+
--system-package Scan <input> for installed system package databases.
1515
--package-in-compiled Scan <input> for package and dependency related data in
16-
compiled binaries. Currently supported compiled
17-
binaries:Go, Rust.
18-
--package-only Scan for system and application package data and skip
19-
license/copyright detection and top-level package
20-
creation.
21-
-c, --copyright Scan <input> for copyrights.
16+
compiled binaries. Currently supported compiled
17+
binaries: Go, Rust.
18+
--package-only Scan for system and application package data and skip
19+
license/copyright detection and top-level package
20+
creation.
21+
-c, --copyright Scan <input> for copyrights.
2222

2323
other scans:
2424
-i, --info Scan <input> for file information (size, checksums, etc).

tests/scancode/data/help/help_linux.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ Usage: scancode [OPTIONS] <OUTPUT FORMAT OPTION(s)> <input>...
88
Options:
99

1010
primary scans:
11-
-l, --license Scan <input> for licenses.
12-
-p, --package Scan <input> for application package and dependency
13-
manifests, lockfiles and related data.
14-
--system-package Scan <input> for installed system package databases.
11+
-l, --license Scan <input> for licenses.
12+
-p, --package Scan <input> for application package and dependency
13+
manifests, lockfiles and related data.
14+
--system-package Scan <input> for installed system package databases.
1515
--package-in-compiled Scan <input> for package and dependency related data in
16-
compiled binaries. Currently supported compiled
17-
binaries: Go, Rust.
18-
--package-only Scan for system and application package data and skip
19-
license/copyright detection and top-level package
20-
creation.
21-
-c, --copyright Scan <input> for copyrights.
22-
--go-symbol Collect Go symbols.
23-
--rust-symbol Collect Rust symbols from rust binaries.
16+
compiled binaries. Currently supported compiled
17+
binaries: Go, Rust.
18+
--package-only Scan for system and application package data and skip
19+
license/copyright detection and top-level package
20+
creation.
21+
-c, --copyright Scan <input> for copyrights.
22+
--go-symbol Collect Go symbols.
23+
--rust-symbol Collect Rust symbols from rust binaries.
2424

2525
other scans:
2626
-i, --info Scan <input> for file information (size, checksums, etc).

tests/scancode/test_cli.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
from commoncode.system import on_mac
2020
from commoncode.system import on_macos_14_or_higher
2121
from commoncode.system import on_windows
22-
from commoncode.system import py36
23-
from commoncode.system import py37
2422

2523
from scancode.cli_test_utils import check_json_scan
2624
from scancode.cli_test_utils import load_json_result
@@ -901,9 +899,6 @@ def test_check_error_count():
901899
assert str(error_files) == str(error_count)
902900

903901

904-
on_mac_new_py = on_mac and not (py36 or py37)
905-
906-
907902
def test_scan_keep_temp_files_is_false_by_default():
908903
test_file = test_env.get_test_loc('tempfiles/samples')
909904
result_file = test_env.get_temp_file('json')
@@ -919,7 +914,7 @@ def test_scan_keep_temp_files_is_false_by_default():
919914
# the SCANCODE_TEMP dir is not deleted, but it should be empty
920915
assert os.path.exists(temp_directory)
921916
# this does not make sense but that's what is seen in practice
922-
if on_mac_new_py:
917+
if on_mac:
923918
expected = 4
924919
elif on_windows:
925920
expected = 2
@@ -945,8 +940,8 @@ def test_scan_keep_temp_files_keeps_files():
945940
# the SCANCODE_TEMP dir is not deleted, but it should not be empty
946941
assert os.path.exists(temp_directory)
947942
# this does not make sense but that's what is seen in practice
948-
expected = 8 if (on_windows or on_mac_new_py) else 7
949-
if on_mac_new_py:
943+
expected = 8 if (on_windows or on_mac) else 7
944+
if on_mac:
950945
expected = 10
951946
elif on_windows:
952947
expected = 8

0 commit comments

Comments
 (0)