updated for version 7.3.1172
Problem: Python 2: loading modules doesn't work well.
Solution: Fix the code. Add more tests. (ZyX)
diff --git a/src/testdir/test87.in b/src/testdir/test87.in
index 7a3d583..1223ca9 100644
--- a/src/testdir/test87.in
+++ b/src/testdir/test87.in
@@ -2,6 +2,7 @@
STARTTEST
:so small.vim
+:set noswapfile
:if !has('python3') | e! test.ok | wq! test.out | endif
:lang C
:py3 import vim
@@ -1038,10 +1039,16 @@
:"
:" Test import
py3 << EOF
+sys.path.insert(0, os.path.join(os.getcwd(), 'python_before'))
+sys.path.append(os.path.join(os.getcwd(), 'python_after'))
vim.options['rtp'] = os.getcwd().replace(',', '\\,').replace('\\', '\\\\')
from module import dir as d
from modulex import ddir
cb.append(d + ',' + ddir)
+import before
+cb.append(before.dir)
+import after
+cb.append(after.dir)
EOF
:"
:" Test exceptions