1- from pathlib import Path
2-
31import pytest
2+ from pathlib import Path
43
54from codeaudit .filehelpfunctions import read_in_source_file
65from codeaudit .issuevalidations import find_constructs
@@ -36,7 +35,7 @@ def test_os_mkdir():
3635 actual_data = find_constructs (source , constructs )
3736
3837 # This is the expected dictionary
39- expected_data = {"os.mkdir" : [26 ]}
38+ expected_data = {"os.mkdir" : [25 ]}
4039
4140 # Assert that the actual data matches the expected data
4241 assert actual_data == expected_data
@@ -54,7 +53,7 @@ def test_os_mkfifo():
5453 actual_data = find_constructs (source , constructs )
5554
5655 # This is the expected dictionary
57- expected_data = {"os.mkfifo" : [48 ]}
56+ expected_data = {"os.mkfifo" : [47 ]}
5857
5958 # Assert that the actual data matches the expected data
6059 assert actual_data == expected_data
@@ -72,7 +71,7 @@ def test_os_mknod():
7271 actual_data = find_constructs (source , constructs )
7372
7473 # This is the expected dictionary
75- expected_data = {"os.mknod" : [65 ]}
74+ expected_data = {"os.mknod" : [64 ]}
7675
7776 # Assert that the actual data matches the expected data
7877 assert actual_data == expected_data
@@ -90,7 +89,7 @@ def test_os_makedirs():
9089 actual_data = find_constructs (source , constructs )
9190
9291 # This is the expected dictionary
93- expected_data = {"os.makedirs" : [13 , 82 ]}
92+ expected_data = {"os.makedirs" : [13 , 80 ]}
9493
9594 # Assert that the actual data matches the expected data
9695 assert actual_data == expected_data
@@ -108,7 +107,7 @@ def test_os_makedev():
108107 actual_data = find_constructs (source , constructs )
109108
110109 # This is the expected dictionary
111- expected_data = {"os.makedev" : [94 ]}
110+ expected_data = {"os.makedev" : [92 ]}
112111
113112 # Assert that the actual data matches the expected data
114113 assert actual_data == expected_data
@@ -125,9 +124,9 @@ def test_sys_calls():
125124
126125 # This is the expected dictionary
127126 expected_data = {
128- "sys.call_tracing" : [12 ],
129- "sys.setprofile" : [29 , 31 ],
130- "sys.settrace" : [35 , 37 ],
127+ "sys.call_tracing" : [15 ],
128+ "sys.setprofile" : [34 , 36 ],
129+ "sys.settrace" : [41 , 43 ],
131130 }
132131
133132 # Assert that the actual data matches the expected data
0 commit comments