diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-05-25 20:39:09 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-05-25 20:39:09 +0200 |
commit | 2177f9fe18a927ef65ccebb0856722a28dc00252 (patch) | |
tree | c75dc489980efd00171f826a8c62e1b92b1fe9c5 /src/testdir/test86.in | |
parent | 03e19a04ac2ca55643663b97b6ab94043233dcbd (diff) | |
download | vim-git-2177f9fe18a927ef65ccebb0856722a28dc00252.tar.gz |
patch 7.4.1843v7.4.1843
Problem: Tests involving Python are flaky.
Solution: Set the pt_auto field. Add tests. (Nikolai Pavlov)
Diffstat (limited to 'src/testdir/test86.in')
-rw-r--r-- | src/testdir/test86.in | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/testdir/test86.in b/src/testdir/test86.in index 71fe920ad..bf7b3d31c 100644 --- a/src/testdir/test86.in +++ b/src/testdir/test86.in @@ -877,6 +877,12 @@ EOF :$put =string(pyeval('vim.Function(''tr'', args=[])')) :$put =string(pyeval('vim.Function(''tr'', self={})')) :$put =string(pyeval('vim.Function(''tr'', args=[123, 3, 4], self={})')) +:$put ='auto_rebind' +:$put =string(pyeval('vim.Function(''tr'', auto_rebind=False)')) +:$put =string(pyeval('vim.Function(''tr'', args=[123, 3, 4], auto_rebind=False)')) +:$put =string(pyeval('vim.Function(''tr'', args=[], auto_rebind=False)')) +:$put =string(pyeval('vim.Function(''tr'', self={}, auto_rebind=False)')) +:$put =string(pyeval('vim.Function(''tr'', args=[123, 3, 4], self={}, auto_rebind=False)')) :" :" Test vim.Function :function Args(...) @@ -915,11 +921,27 @@ psa1 = vim.Function('SelfArgs', args=['abcArgsPSA1']) psa2 = vim.Function('SelfArgs', args=[]) psa3 = vim.Function('SelfArgs', args=['abcArgsPSA3'], self={'abcSelfPSA3': 'abcSelfPSA3Val'}) psa4 = vim.Function('SelfArgs', self={'abcSelfPSA4': 'abcSelfPSA4Val'}) +psa5 = vim.Function('SelfArgs', self={'abcSelfPSA5': 'abcSelfPSA5Val'}, auto_rebind=0) +psa6 = vim.Function('SelfArgs', args=['abcArgsPSA6'], self={'abcSelfPSA6': 'abcSelfPSA6Val'}, auto_rebind=()) +psa7 = vim.Function('SelfArgs', args=['abcArgsPSA7'], auto_rebind=[]) +psa8 = vim.Function('SelfArgs', auto_rebind=False) +psa9 = vim.Function('SelfArgs', self={'abcSelfPSA9': 'abcSelfPSA9Val'}, auto_rebind=True) +psaA = vim.Function('SelfArgs', args=['abcArgsPSAA'], self={'abcSelfPSAA': 'abcSelfPSAAVal'}, auto_rebind=1) +psaB = vim.Function('SelfArgs', args=['abcArgsPSAB'], auto_rebind={'abcARPSAB': 'abcARPSABVal'}) +psaC = vim.Function('SelfArgs', auto_rebind=['abcARPSAC']) cb.append('sa: ' + repr(sa)) cb.append('psa1: ' + repr(psa1)) cb.append('psa2: ' + repr(psa2)) cb.append('psa3: ' + repr(psa3)) cb.append('psa4: ' + repr(psa4)) +cb.append('psa5: ' + repr(psa5)) +cb.append('psa6: ' + repr(psa6)) +cb.append('psa7: ' + repr(psa7)) +cb.append('psa8: ' + repr(psa8)) +cb.append('psa9: ' + repr(psa9)) +cb.append('psaA: ' + repr(psaA)) +cb.append('psaB: ' + repr(psaB)) +cb.append('psaC: ' + repr(psaC)) psar = vim.Function('SelfArgs', args=[{'abcArgsPSAr': 'abcArgsPSArVal'}], self={'abcSelfPSAr': 'abcSelfPSArVal'}) psar.args[0]['abcArgsPSAr2'] = [psar.self, psar.args[0]] @@ -942,6 +964,19 @@ EOF :$put ='s(psa2): '.string(pyeval('psa2')) :$put ='s(psa3): '.string(pyeval('psa3')) :$put ='s(psa4): '.string(pyeval('psa4')) +:$put ='s(psa5): '.string(pyeval('psa5')) +:$put ='s(psa6): '.string(pyeval('psa6')) +:$put ='s(psa7): '.string(pyeval('psa7')) +:$put ='s(psa8): '.string(pyeval('psa8')) +:$put ='s(psa9): '.string(pyeval('psa9')) +:$put ='s(psaA): '.string(pyeval('psaA')) +:$put ='s(psaB): '.string(pyeval('psaB')) +:$put ='s(psaC): '.string(pyeval('psaC')) +: +:for v in ['sa', 'psa1', 'psa2', 'psa3', 'psa4', 'psa5', 'psa6', 'psa7', 'psa8', 'psa9', 'psaA', 'psaB', 'psaC'] +: let d = {'f': pyeval(v)} +: $put ='d.'.v.'(): '.string(d.f()) +:endfor : :py ecall('a()', a, ) :py ecall('pa1()', pa1, ) @@ -1026,6 +1061,25 @@ cb.append('psa2.name: ' + s(psa2.name)) cb.append('psa3.name: ' + s(psa3.name)) cb.append('psa4.name: ' + s(psa4.name)) +cb.append('a.auto_rebind: ' + s(a.auto_rebind)) +cb.append('pa1.auto_rebind: ' + s(pa1.auto_rebind)) +cb.append('pa2.auto_rebind: ' + s(pa2.auto_rebind)) +cb.append('pa3.auto_rebind: ' + s(pa3.auto_rebind)) +cb.append('pa4.auto_rebind: ' + s(pa4.auto_rebind)) +cb.append('sa.auto_rebind: ' + s(sa.auto_rebind)) +cb.append('psa1.auto_rebind: ' + s(psa1.auto_rebind)) +cb.append('psa2.auto_rebind: ' + s(psa2.auto_rebind)) +cb.append('psa3.auto_rebind: ' + s(psa3.auto_rebind)) +cb.append('psa4.auto_rebind: ' + s(psa4.auto_rebind)) +cb.append('psa5.auto_rebind: ' + s(psa5.auto_rebind)) +cb.append('psa6.auto_rebind: ' + s(psa6.auto_rebind)) +cb.append('psa7.auto_rebind: ' + s(psa7.auto_rebind)) +cb.append('psa8.auto_rebind: ' + s(psa8.auto_rebind)) +cb.append('psa9.auto_rebind: ' + s(psa9.auto_rebind)) +cb.append('psaA.auto_rebind: ' + s(psaA.auto_rebind)) +cb.append('psaB.auto_rebind: ' + s(psaB.auto_rebind)) +cb.append('psaC.auto_rebind: ' + s(psaC.auto_rebind)) + del s del a @@ -1038,6 +1092,14 @@ del psa1 del psa2 del psa3 del psa4 +del psa5 +del psa6 +del psa7 +del psa8 +del psa9 +del psaA +del psaB +del psaC del psar del ecall |