mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
Python: Add test case for .copy() as a copy step
This commit is contained in:
@@ -216,3 +216,9 @@ def flow_from_within_deepcopy_fp():
|
||||
def flow_through_deepcopy_fp(x=[]):
|
||||
y = deepcopy(x)
|
||||
y.append(1)
|
||||
|
||||
# Use of copy method:
|
||||
|
||||
def flow_through_copy_fp(x=[]):
|
||||
y = x.copy()
|
||||
y.append(1) #$ SPURIOUS: modification=y
|
||||
|
||||
Reference in New Issue
Block a user