Commit Graph

15 Commits

Author SHA1 Message Date
Taus Brock-Nannestad
3d0ee90880 Python: Make two tests not depend on minor Python version.
For syntax errors, we simply report the major version.

For unused imports, we were getting a result for `typing.py` when run under
Python 3.7.3. To prevent this import from being considered, I've set the maximum
import depth to `0`.
2020-03-12 18:19:53 +01:00
Taus
f3b62e106d Merge pull request #2840 from BekaValentine/python-objectapi-to-valueapi-useofapply
Python: ObjectAPI to ValueAPI: UseofApply
2020-03-02 21:40:35 +01:00
Rebecca Valentine
d19957f09d Puts use_of_apply example back into expressions_test to avoid messing up other tests 2020-02-27 10:44:46 -08:00
Taus
d9383d0e86 Merge pull request #2902 from RasmusWL/python-use-of-input
Python: Highlight py/use-of-input is for Python 2
2020-02-27 13:15:32 +01:00
Rebecca Valentine
b0493458d6 Combine and clean up the test files 2020-02-26 09:04:14 -08:00
Rasmus Wriedt Larsen
9d629aef95 Python: Highlight py/use-of-input is for Python 2 2020-02-24 15:13:19 +01:00
Rebecca Valentine
14273fc677 Adds missing result to expected file 2020-02-21 11:25:03 -08:00
Rebecca Valentine
2f3ea10cf8 Move the query and examples over to 2/query-tests 2020-02-20 16:31:58 -08:00
Rebecca Valentine
e55f01d905 Adds new UseofApply test case and results to the Python2 tests dir 2020-02-18 12:12:25 -08:00
Rasmus Wriedt Larsen
c0b7dcc019 Python: Remove ignored automatic_locations in qltest options files 2020-02-06 14:28:10 +01:00
Henning Makholm
073563a19b Python tests: explicitly specify --lang2 for python2 tests
This allows them to work with the `LegacyQltLanguage.PYTHON3` extraction recipe.
2019-12-07 02:38:02 +01:00
Taus Brock-Nannestad
67647bda66 Python: Fix false positive for py/use-of-input.
Fixes #1969.

The points-to analysis does not know that the assignment `input = raw_input`
cannot fail under Python 2, and so there are two possible values that `input`
could point-to after exiting the exception handler: the built-in `input`, or the
built-in `raw_input`. In the latter case we do not want to report the alert, and
so adding a check that the given function does not point-to the built-in
`raw_input` suffices.
2019-11-22 16:46:20 +01:00
Rasmus Wriedt Larsen
89a13213e2 Python: Accept changes in Python 2 specific tests
Due to internal PR#35123 we now actually run the tests under
`python/ql/test/2/...`

Since we haven't done this in a while, test output has changed a bit. These
changes look perfectly fine.
2019-11-08 13:48:14 +01:00
Mark Shannon
ccd18b6c67 Python: Update python-2 specific tests for new parser/tokenizer. 2019-03-12 17:53:50 +00:00
Mark Shannon
52ddd79cab Python: Add 2/3 specific query tests. 2019-02-08 15:13:17 +00:00