JarrodCTaylor/vim-python-test-runner

Run test for a specific method can run wrong method if the current line is duplicated in the file

Closed this issue · 1 comments

When running a test for a specific method either in Django or outside of a Django application. If the current line that the cursor is on appears appears twice in the file the wrong method could be ran.

Current Workaround: Place the cursor on the declaration line of the method when we want to test a specific method.

Proposed Solution: could be determining the line number that the cursor is on and using that line number to validate when we have reached that part of the file as opposed to the current method of finding a matching string.

This issue is now resolved in the latest commit. The current line is looked up in the buffer by the index and not the string contents of the line thus resolving the problem.