alfredodeza / pytest.vim

Runs your UnitTests with py.test displaying red/green bars and errors
274 stars 40 forks source link

pytest command not configurable #67

Closed rsnyman closed 5 years ago

rsnyman commented 5 years ago

I'm using Debian and Python 3, and pytest is available as "pytest-3" or "py.test-3", but pytest.vim is hardcoded to "py.test".

Please would you consider making the pytest command configurable? That way I'd just be able to set it in my .vimrc like many of the other plugins I use.

Thank you!

alfredodeza commented 5 years ago

Wow, I had no idea. What a bummer that distros have decided to mangle the name like that.

While I look at this, I guess you could symlink to py.test in the meantime?

rsnyman commented 5 years ago

It's because you can install pytest for Python 2 or Python 3 or both at the same time. This way there are no conflicts between the two. I mostly do Python3 development, so I have the Python3 versions of things installed.

Thanks for looking into this!

alfredodeza commented 5 years ago

@rsnyman can you try the custom-exec branch? Should allow you to define a g:pytest_executable for either a path or just the filename

rsnyman commented 5 years ago

Yay, it works! Thank you!

alfredodeza commented 5 years ago

Fixed in master with 2eda077387964251c9855aa1feb74a0efa3c25a5