mirror of
https://github.com/github/codeql.git
synced 2025-12-23 20:26:32 +01:00
Initial commit of Python queries and QL libraries.
This commit is contained in:
committed by
Mark Shannon
parent
90c75cd362
commit
5f58824d1b
9
python/ql/src/Statements/AssertLiteralConstant.py
Normal file
9
python/ql/src/Statements/AssertLiteralConstant.py
Normal file
@@ -0,0 +1,9 @@
|
||||
def buy_bananas(n):
|
||||
if n > 500:
|
||||
assert False, "Too many bananas."
|
||||
send_order("bananas", n)
|
||||
|
||||
def buy_bananas_correct(n):
|
||||
if n > 500:
|
||||
raise AssertionError("Too many bananas")
|
||||
send_order("bananas", n)
|
||||
Reference in New Issue
Block a user