@@ -18,50 +18,39 @@ def test_run():
1818 assert scan_exclude_success is True , "Test Run: Exclude command failed"
1919
2020
21- def test_help_command ():
21+ def test_release ():
2222 success , _ = run_command ("fosslight_source -h" )
2323 assert success is True , "Test Release: Help command failed "
2424
25-
26- def test_scan_command ():
2725 success , _ = run_command ("fosslight_source -p tests/test_files -o test_scan/scan_result.csv" )
2826 assert success is True , "Test Release: Failed to generate scan result CSV file"
29-
27+
3028 assert os .path .exists ("test_scan/scan_result.csv" ), "Test Release: scan_result.csv file not generated"
31-
3229 with open ("test_scan/scan_result.csv" , 'r' ) as file :
3330 content = file .read ()
34-
3531 assert len (content ) > 0 , "Test Release: scan_result.csv is empty"
3632 print (f"Content of scan_result.csv:\n { content } " )
3733
38-
39- def test_exclude_command ():
4034 success , _ = run_command (
4135 "fosslight_source -p tests -e test_files/test cli_test.py -j -m -o test_scan2/scan_exclude_result.csv"
4236 )
4337 assert success is True , "Test release: Exclude scan failded"
44-
38+
4539 assert os .path .exists ("test_scan2/scan_exclude_result.csv" ), "Test Release: scan_exclude_result.csv file not generated"
46-
4740 with open ("test_scan2/scan_exclude_result.csv" , 'r' ) as file :
4841 content = file .read ()
49-
5042 assert len (content ) > 0 , "Test Release: scan_exclude_result.csv is empty"
5143 print (f"Content of scan_exclude_result.csv:\n { content } " )
5244
53-
54- def test_json_command ():
5545 success , _ = run_command ("fosslight_source -p tests/test_files -m -j -o test_scan3/" )
5646 assert success is True , "Test release: Failed to generate JSON files"
5747
5848
59- def test_ls_test_scan3_command ():
6049 files_in_test_scan3 = os .listdir ("test_scan3" )
6150 assert len (files_in_test_scan3 ) > 0 , "Test Release: test_scan3 is empty"
6251 print (f"Files in test_scan3: { files_in_test_scan3 } " )
6352
6453
6554def test_flake8 ():
66- success , _ = run_command ("flake8 -j 4 " )
55+ success , _ = run_command ("flake8" )
6756 assert success is True , "Flake8: Style check failed"
0 commit comments