From 07aaa75881bb3040acb883f28c1e4752aa16a388 Mon Sep 17 00:00:00 2001 From: "John M. Horan" Date: Mon, 26 Mar 2018 17:01:49 -0700 Subject: [PATCH] Add ScanCode file paths to JSON output #87 Signed-off-by: John M. Horan --- src/deltacode/cli.py | 2 ++ tests/test_cli.py | 12 ++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/deltacode/cli.py b/src/deltacode/cli.py index 3efbff79..1c76b197 100644 --- a/src/deltacode/cli.py +++ b/src/deltacode/cli.py @@ -100,6 +100,8 @@ def cli(new, old, csv_file, json_file, all_delta_types): """ # retrieve the option selections options = OrderedDict([ + ('new_scan_path', new), + ('old_scan_path', old), ('--all-delta-types', all_delta_types) ]) diff --git a/tests/test_cli.py b/tests/test_cli.py index aabdc1f2..b01410c9 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -415,7 +415,11 @@ def test_json_output_option_selected_all_selected(self): assert json_result.get('deltacode_notice') == notice - options = {'--all-delta-types': True} + options = { + 'new_scan_path': new_scan, + 'old_scan_path': old_scan, + '--all-delta-types': True + } assert json_result.get('deltacode_options') == options @@ -569,7 +573,11 @@ def test_json_output_option_selected_all_not_selected(self): assert json_result.get('deltacode_notice') == notice - options = {'--all-delta-types': False} + options = { + 'new_scan_path': new_scan, + 'old_scan_path': old_scan, + '--all-delta-types': False + } assert json_result.get('deltacode_options') == options