8000 python file for testing motions · python-mode/python-mode@0a90e0f · GitHub
[go: up one dir, main page]

Skip to content

Commit 0a90e0f

Browse files
committed
python file for testing motions
python file for testing motions
1 parent d4aa916 commit 0a90e0f

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

tests/motion_decorator.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!coding=utf-8
2+
"""
3+
to test pymode motions, please put cursor on each of the lines
4+
and press "vaM" for selecting methods or
5+
"vaC" for selection class.
6+
"""
7+
8+
def a_decorator(func):
9+
print("chamando func")
10+
def wrapped(*args, **kw):
11+
return func(*args, **kw)
12+
print("Pós func")
13+
return wrapped
14+
15+
def b_decorator(func):
16+
print("second chamando func")
17+
def wrapped(*args, **kw):
18+
return func(*args, **kw)
19+
print("second Pós func")
20+
return wrapped
21+
22+
@b_decorator
23+
@a_decorator
24+
def teste():
25+
print("Not Selecting Decorator")
26+
27+
class Teste:
28+
@a_decorator
29+
@b_decorator
30+
def metodo(self):
31+
print("Meu método")
32+
33+
34+
teste()
35+
36+
testinho = Teste()
37+
testinho.metodo()

0 commit comments

Comments
 (0)
0