Skip to content

Commit ea562de

Browse files
Fix tests
1 parent ec40ea8 commit ea562de

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#select
21
| resources_test.py:4:10:4:25 | ControlFlowNode for open() | File may not be closed if $@ raises an exception. | resources_test.py:5:5:5:33 | ControlFlowNode for Attribute() | this operation |
32
| resources_test.py:9:10:9:25 | ControlFlowNode for open() | File is opened but is not closed. | file://:0:0:0:0 | (none) | this operation |
43
| resources_test.py:108:11:108:20 | ControlFlowNode for open() | File is opened but is not closed. | file://:0:0:0:0 | (none) | this operation |
@@ -8,5 +7,3 @@
87
| resources_test.py:248:11:248:25 | ControlFlowNode for open() | File is opened but is not closed. | file://:0:0:0:0 | (none) | this operation |
98
| resources_test.py:269:10:269:27 | ControlFlowNode for Attribute() | File may not be closed if $@ raises an exception. | resources_test.py:271:5:271:19 | ControlFlowNode for Attribute() | this operation |
109
| resources_test.py:285:11:285:20 | ControlFlowNode for open() | File may not be closed if $@ raises an exception. | resources_test.py:287:5:287:31 | ControlFlowNode for Attribute() | this operation |
11-
testFailures
12-
| resources_test.py:154:26:154:154 | Comment # $SPURIOUS: Alert # Dataflow appears to not detect this with statement as guarding the exceptions produced by the `read()` call. | Fixed spurious result: Alert |

python/ql/test/query-tests/Resources/FileNotAlwaysClosed/resources_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def not_closed17():
151151
#With statement will close the fp
152152
def closed18(path):
153153
try:
154-
f18 = open(path) # $Alert
154+
f18 = open(path)
155155
except IOError as ex:
156156
print(ex)
157157
raise ex

0 commit comments

Comments
 (0)