Skip to content

Commit 8717dd5

Browse files
committed
Add some more tests for 'import' and 'from' keywords.
1 parent 82c76af commit 8717dd5

File tree

3 files changed

+83
-1
lines changed

3 files changed

+83
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Magic Python [![Build Status](https://travis-ci.org/MagicStack/MagicPython.svg?branch=master)](https://travis-ci.org/MagicStack/MagicPython) [![apm](https://img.shields.io/apm/dm/magicpython.svg?label=Atom)](https://atom.io/packages/magicpython) [![Package Control](https://img.shields.io/packagecontrol/dt/MagicPython.svg?label=Sublime%20Text)](https://packagecontrol.io/packages/MagicPython) [![](https://img.shields.io/badge/Visual%20Studio%20Code-%3E6k-red.svg)](https://marketplace.visualstudio.com/items?itemName=magicstack.MagicPython)
1+
# Magic Python [![Build Status](https://travis-ci.org/MagicStack/MagicPython.svg?branch=master)](https://travis-ci.org/MagicStack/MagicPython) [![apm](https://img.shields.io/apm/dm/magicpython.svg?label=Atom)](https://atom.io/packages/magicpython) [![Package Control](https://img.shields.io/packagecontrol/dt/MagicPython.svg?label=Sublime%20Text)](https://packagecontrol.io/packages/MagicPython) [![](https://img.shields.io/badge/Visual%20Studio%20Code-%3E7k-red.svg)](https://marketplace.visualstudio.com/items?itemName=magicstack.MagicPython)
22

33
This is a package with preferences and syntax highlighter for cutting edge
44
Python 3, although Python 2 is well supported, too. The syntax is compatible

test/statements/import4.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
from....foo import a
2+
from...foo import b
3+
from..foo import c
4+
from.foo import d
5+
6+
7+
8+
from : keyword.control.import.python, source.python
9+
.... : source.python
10+
foo : source.python
11+
: source.python
12+
import : keyword.control.import.python, source.python
13+
: source.python
14+
a : source.python
15+
from : keyword.control.import.python, source.python
16+
... : source.python
17+
foo : source.python
18+
: source.python
19+
import : keyword.control.import.python, source.python
20+
: source.python
21+
b : source.python
22+
from : keyword.control.import.python, source.python
23+
.. : source.python
24+
foo : source.python
25+
: source.python
26+
import : keyword.control.import.python, source.python
27+
: source.python
28+
c : source.python
29+
from : keyword.control.import.python, source.python
30+
. : source.python
31+
foo : source.python
32+
: source.python
33+
import : keyword.control.import.python, source.python
34+
: source.python
35+
d : source.python

test/statements/import5.py

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
from.foo import d
2+
from.import a
3+
4+
foo.import
5+
6+
raise Exception from Foo
7+
8+
def bar():
9+
yield from baz
10+
11+
12+
13+
from : keyword.control.import.python, source.python
14+
. : source.python
15+
foo : source.python
16+
: source.python
17+
import : keyword.control.import.python, source.python
18+
: source.python
19+
d : source.python
20+
from : keyword.control.import.python, source.python
21+
. : source.python
22+
import : keyword.control.import.python, source.python
23+
: source.python
24+
a : source.python
25+
: source.python
26+
foo : source.python
27+
. : source.python
28+
import : keyword.control.flow.python, source.python
29+
: source.python
30+
raise : keyword.control.flow.python, source.python
31+
: source.python
32+
Exception : source.python, support.type.exception.python
33+
: source.python
34+
from : keyword.control.flow.python, source.python
35+
: source.python
36+
Foo : source.python
37+
: source.python
38+
def : meta.function.python, source.python, storage.type.function.python
39+
: meta.function.python, source.python
40+
bar : entity.name.function.python, meta.function.python, source.python
41+
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
42+
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
43+
: : meta.function.python, punctuation.section.function.begin.python, source.python
44+
: source.python
45+
yield from : keyword.control.flow.python, source.python
46+
: source.python
47+
baz : source.python

0 commit comments

Comments
 (0)