Skip to content

Commit b453cf8

Browse files
authored
Merge pull request github#2906 from RasmusWL/python-add-3-imports-tests
Python: Add Python 3 Imports tests from internal repo
2 parents b9bb2ec + 2b997ec commit b453cf8

File tree

10 files changed

+62
-0
lines changed

10 files changed

+62
-0
lines changed

python/ql/test/3/query-tests/Imports/encoding_error/EncodingError.expected

Whitespace-only changes.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
123456789
2+
223456789
3+
323456789
4+
423456789
5+
5234567ø9
6+
623456789
7+
723456789
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Imports/EncodingError.ql
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
| bad_encoding.py:11:19:11:19 | Encoding Error | 'utf-8' codec can't decode byte 0x82 in position 82: invalid start byte |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Imports/EncodingError.ql
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
| nonsense.py:1:2:1:2 | Syntax Error | Syntax Error (in Python 3.5). |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Imports/SyntaxError.ql
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"""Multi-line docstring
2+
3+
4+
5+
6+
"""
7+
8+
# encoding:shift-jis
9+
10+
def f():
11+
print "Python の開発は、1990 年ごろから開始されています"
12+
"""
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
`Twas brillig, and the slithy toves
2+
Did gyre and gimble in the wabe:
3+
All mimsy were the borogoves,
4+
And the mome raths outgrabe.
5+
6+
7+
"Beware the Jabberwock, my son!
8+
The jaws that bite, the claws that catch!
9+
Beware the Jubjub bird, and shun
10+
The frumious Bandersnatch!"
11+
12+
He took his vorpal sword in hand:
13+
Long time the manxome foe he sought --
14+
So rested he by the Tumtum tree,
15+
And stood awhile in thought.
16+
17+
And, as in uffish thought he stood,
18+
The Jabberwock, with eyes of flame,
19+
Came whiffling through the tulgey wood,
20+
And burbled as it came!
21+
22+
One, two! One, two! And through and through
23+
The vorpal blade went snicker-snack!
24+
He left it dead, and with its head
25+
He went galumphing back.
26+
27+
"And, has thou slain the Jabberwock?
28+
Come to my arms, my beamish boy!
29+
O frabjous day! Callooh! Callay!'
30+
He chortled in his joy.
31+
32+
33+
`Twas brillig, and the slithy toves
34+
Did gyre and gimble in the wabe;
35+
All mimsy were the borogoves,
36+
And the mome raths outgrabe.
37+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print "Hello World"

0 commit comments

Comments
 (0)