Taus Brock-Nannestad
f07a7bf8cf
Python: Autoformat everything using qlformat.
...
Will need subsequent PRs fixing up test failures (due to deprecated
methods moving around), but other than that everything should be
straight-forward.
2020-07-07 15:43:52 +02:00
Rasmus Wriedt Larsen
49d7e12acd
Python: Remove unnecessary restriction from getNamedArgumentForCall
...
As agreed in https://github.com/github/codeql/pull/3407
2020-05-25 10:17:37 +02:00
Rasmus Wriedt Larsen
4fc3cae646
Python: Add test for how arguments to *args and **kwargs are handled
2020-05-25 10:16:10 +02:00
Rasmus Wriedt Larsen
07ae40206f
Python: Don't allow getParameter(-1) for BoundMethodValue
...
As per discussion in the PR
2020-05-05 11:37:10 +02:00
Rasmus Wriedt Larsen
affca1a728
Python: Add test-cases using keyword arguments for builtin function
2020-05-05 10:26:25 +02:00
Rasmus Wriedt Larsen
838106d49c
Python: Refactor get[Named]ArgumentForCall
...
Also fixed a bug for BoundMethodValue, as highlighted in the expected diff 👍
2020-05-04 20:51:23 +02:00
Rasmus Wriedt Larsen
bc92c26e12
Python: Add BoundMethodValue
2020-05-04 20:51:12 +02:00
Rasmus Wriedt Larsen
96fdb7a5b6
Python: Add tests for getParameter[byName]
...
These already have results for BoundMethodValue, although
1) it's a bit strange that `getParameter(-1)` has results
2) why does `Method(Function C.n, class C)` exists? this would only be relevant
if `n` was a classmethod, but it isn't. It's not a problem that it exsits per
se, but curious.
2020-05-04 20:51:04 +02:00
Rasmus Wriedt Larsen
e9859ad96d
Python: Fix getArgumentForCall when using keyword arguments
...
Yikes :|
2020-05-04 20:50:56 +02:00
Rasmus Wriedt Larsen
acb506db21
Python: Add test for getNamedArgumentForCall
...
and rename the one for getArgumentForCall
2020-05-04 20:50:32 +02:00
Rasmus Wriedt Larsen
9ec32ee1c1
Python: Add test-cases using keyword arguments
2020-05-04 20:50:19 +02:00
Rasmus Wriedt Larsen
fc0b0221f0
Python: Add test-cases for BuiltinFunction and BuiltinMethod
2020-05-04 20:50:14 +02:00
Rasmus Wriedt Larsen
f624754390
Python: Use Value in GetACAll test
...
That was not possible when using the old Object-API, but in Value-API getACall
is defined on all Values.
2020-05-04 20:50:06 +02:00
Rasmus Wriedt Larsen
06b67e0d32
Python: Modernise test/library-tests/PointsTo/calls/*
2020-05-04 20:49:57 +02:00
Rasmus Wriedt Larsen
a5289bd708
Python: Use Object in CallRefersTo test
...
Since other things than FunctionObject can be called ;)
2020-05-04 20:49:47 +02:00
Rasmus Wriedt Larsen
7b8b4af6d2
Python: Add test for call.getFunction().refersTo
...
Showing that
`call.getFunction().refersTo(func)` gives different results from
`call = func.getACall()`
2020-05-04 20:49:19 +02:00
Taus Brock-Nannestad
87a9f51c78
Python: Autoformat all .ql files.
2020-03-30 11:59:10 +02:00
Mark Shannon
05b69a1c0f
QL tests for Python queries and libraries.
2018-11-19 15:15:54 +00:00