Skip to content

Commit 66d9cc1

Browse files
Fix test failures
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
1 parent f08f225 commit 66d9cc1

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ chardet==5.2.0
1010
charset-normalizer==3.4.2
1111
click==8.3.0
1212
colorama==0.4.6
13-
commoncode==32.4.0
13+
commoncode==32.4.1
1414
construct==2.10.70
1515
container-inspector==33.0.0
1616
cryptography==45.0.4

setup-mini.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ install_requires =
7272
click >= 6.7, !=7.0, !=8.1.8;python_version<'3.10'
7373
click >= 8.2.0;python_version>='3.10'
7474
colorama >= 0.3.9
75-
commoncode >= 32.3.0
75+
commoncode >= 32.4.0
7676
container-inspector >= 31.0.0
7777
debian-inspector >= 31.1.0
7878
dparse2 >= 0.7.0

src/packagedcode/win_reg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import sys
1313
from pathlib import Path
1414
from pathlib import PureWindowsPath
15+
from dataclasses import asdict
1516

1617
import attr
1718

@@ -68,7 +69,7 @@ def get_registry_tree(registry_location, registry_path):
6869
if not name_key_entry:
6970
return []
7071
return [
71-
attr.asdict(entry) for entry in registry_hive.recurse_subkeys(name_key_entry, as_json=True)
72+
asdict(entry) for entry in registry_hive.recurse_subkeys(name_key_entry, as_json=True)
7273
]
7374

7475

tests/scancode/test_cli.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
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
22+
from commoncode.system import py314
2423

2524
from scancode.cli_test_utils import check_json_scan
2625
from scancode.cli_test_utils import load_json_result
@@ -901,8 +900,6 @@ def test_check_error_count():
901900
assert str(error_files) == str(error_count)
902901

903902

904-
on_mac_new_py = on_mac and not (py36 or py37)
905-
906903

907904
def test_scan_keep_temp_files_is_false_by_default():
908905
test_file = test_env.get_test_loc('tempfiles/samples')
@@ -919,9 +916,9 @@ def test_scan_keep_temp_files_is_false_by_default():
919916
# the SCANCODE_TEMP dir is not deleted, but it should be empty
920917
assert os.path.exists(temp_directory)
921918
# this does not make sense but that's what is seen in practice
922-
if on_mac_new_py:
919+
if on_mac:
923920
expected = 4
924-
elif on_windows:
921+
elif on_windows or (on_linux and py314):
925922
expected = 2
926923
else:
927924
expected = 1
@@ -945,10 +942,10 @@ def test_scan_keep_temp_files_keeps_files():
945942
# the SCANCODE_TEMP dir is not deleted, but it should not be empty
946943
assert os.path.exists(temp_directory)
947944
# 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:
945+
expected = 8 if (on_windows or on_mac) else 7
946+
if on_mac:
950947
expected = 10
951-
elif on_windows:
948+
elif on_windows or (on_linux and py314):
952949
expected = 8
953950
else:
954951
expected = 7

0 commit comments

Comments
 (0)