Skip to content

Commit d6d8e22

Browse files
author
MattDMo
committed
Various changes for testing
1 parent a94f9cb commit d6d8e22

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

tests/test_code.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
from . import foo
2+
from .. import bar
3+
from ... import baz
4+
5+
import ...snurp
6+
7+
def blah(...):
8+
pass
9+
10+
11+
112
class Foo(tuple):
213
@staticmethod
314
def __new__(cls, initialValue=(0,0)):
@@ -13,6 +24,7 @@ def __init__(self, initialValue=(0,0)):
1324
def somefunc(arg, arrg=pirate):
1425
pass
1526

27+
@property
1628

1729
list(map(str, range(100)))
1830
[str(i) for i in range(100)]
@@ -25,9 +37,12 @@ def sâomething():
2537
class sâomething(object):
2638
pass
2739

40+
__init__(something)
2841

2942
list(map(str, range(100)))
43+
# ^^^ support.type.python
3044
[str(i) for i in range(100)]
45+
#^^^ support.function.builtin.call.python
3146

3247
super(arg1=1)(arg2=2)
3348
list abs, map
@@ -52,6 +67,11 @@ class sâomething(object):
5267
def function():
5368
pass
5469

70+
@classmethod
71+
def from_foo(cls, foo):
72+
return cls(foo, bar='baz')
73+
# highlighting for arguments broken
74+
5575

5676
mod.func()
5777
mod.submod.func()
@@ -74,3 +94,19 @@ def __init__(self, text='first part'
7494

7595
foo(text="line 1"
7696
"line 2")
97+
98+
foobar(param=r"()")
99+
100+
101+
def f():
102+
print(r"()")
103+
104+
f()
105+
106+
def hi(name):
107+
r""" Say hi!
108+
with a \) special characters.
109+
"""
110+
return 'hi ' + name
111+
112+
print(hi('avi'))

0 commit comments

Comments
 (0)