Skip to content

Commit 30be519

Browse files
Regen test files that are imported with --from-json
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
1 parent 1fa4668 commit 30be519

16 files changed

Lines changed: 103847 additions & 136108 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
path,type,declared_license_expression,scan_errors
2-
apache-2.0.LICENSE,file,apache-2.0 AND mit,
1+
path,type,declared_license_expression,declared_license_expression_spdx,scan_errors
2+
apache-2.0.LICENSE,file,apache-2.0 AND mit,Apache-2.0 AND MIT,

tests/formattedcode/data/csv/expressions/scan.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
"type": "file",
66
"license_detections": [],
77
"declared_license_expression": "apache-2.0 AND mit",
8+
"declared_license_expression_spdx": "Apache-2.0 AND MIT",
9+
"license_clues": [],
810
"scan_errors": []
911
}
1012
]

tests/formattedcode/test_output_csv.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ def test_can_process_live_scan_for_packages_with_root():
124124

125125

126126
def test_output_can_handle_non_ascii_paths():
127+
# very small file with selective attributes just to test unicode, no need
128+
# run scan again, update manually if required
127129
test_file = test_env.get_test_loc('csv/unicode.json')
128130
result_file = test_env.get_temp_file(extension='csv', file_name='test_csv')
129131
run_scan_click(['--from-json', test_file, '--csv', result_file])
@@ -250,6 +252,8 @@ def test_can_process_live_scan_for_packages_strip_root():
250252

251253
@pytest.mark.scanslow
252254
def test_output_contains_license_expression():
255+
# very small file with selective attributes just to test license_expressions,
256+
# no need to run scan again, update manually if required
253257
test_file = test_env.get_test_loc('csv/expressions/scan.json')
254258
result_file = test_env.get_temp_file('csv')
255259
args = ['--from-json', test_file, '--csv', result_file]
@@ -260,6 +264,7 @@ def test_output_contains_license_expression():
260264

261265
@pytest.mark.scanslow
262266
def test_output_handles_non_standard_data():
267+
# non standard data from other tool, update manually if required
263268
test_file = test_env.get_test_loc('csv/non-standard/identified.json')
264269
result_file = test_env.get_temp_file('csv')
265270
args = ['--from-json', test_file, '--csv', result_file]

0 commit comments

Comments
 (0)