aboutsummaryrefslogtreecommitdiffstats
path: root/src/test.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-03-07 17:27:55 +0100
committerMattias Andrée <maandree@operamail.com>2014-03-07 17:27:55 +0100
commit1d4b341900edffae8a04b0d91402d4c136bfb596 (patch)
tree1d24a4a0eee694d72cbf0ac730cfa5a285f39800 /src/test.py
parentadd fsignal (diff)
downloadjoin-python-1d4b341900edffae8a04b0d91402d4c136bfb596.tar.gz
join-python-1d4b341900edffae8a04b0d91402d4c136bfb596.tar.bz2
join-python-1d4b341900edffae8a04b0d91402d4c136bfb596.tar.xz
add joinmethod
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rwxr-xr-xsrc/test.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test.py b/src/test.py
index 0279f2d..a0125df 100755
--- a/src/test.py
+++ b/src/test.py
@@ -153,3 +153,21 @@ unjoining(1)
unjoining(2)
print()
+
+class C:
+ def __init__(self, value):
+ self.value = value
+
+ @joinmethod
+ @fragment
+ def f(self, v):
+ print(' %i' % (self.value + v))
+
+f1 = C(1).f
+f2 = C(2).f
+
+print('Testing @joinmethod, expecting 11,22')
+f1(10)
+f2(20)
+print()
+