Code Monkey home page Code Monkey logo

Comments (5)

sotte avatar sotte commented on July 18, 2024

This did the trick for me:

CompilerSet makeprg=.venv/bin/python\ -m\ pytest\ --tb=short\ -q

Note that .venv/ is my virtual env.

from pytest-vim-compiler.

blueyed avatar blueyed commented on July 18, 2024

Currently it uses just py.test, which should also get picked up from the $PATH, no?
Don't you have the bin dir of your $VIRTUAL_ENV there?

from pytest-vim-compiler.

sotte avatar sotte commented on July 18, 2024

My virtualenv is in .venv/ of each project. But there was a py.test in the site-packages (which I thought should not be used) and that was a 2.7 version. After uninstalling that version the correct py.test from the venv was used.

(I also had to deactivate some plugins but that is unrelated.)

Thanks!

from pytest-vim-compiler.

5long avatar 5long commented on July 18, 2024

@sotte

In case you might have missed this: the recommended way to use virtualenv is to activate it before working on the project. Activating a virtualenv will add ENV/bin to your $PATH, which will allow you to launch ENV/bin/py.test by executing py.test.

Automagically detecting local virtualenv might be good. But there's no single most popular way to organize virtualenv as far as I know:

  • .venv/ is a reasonable choice I guess.
  • I'm using virtualenvwrapper, which works well for me.
  • At where I work, we're installing virtualenv in venv/ and NOT gonna activate it. Instead, we have an in-house PAAS which requires me to use a custom script to launch any executables in the virtualenv. Totally non-standard, but gotta live with it.

So um, I believe activating virtualenv before launching vim should be good enough for this vim compiler works for most people.

from pytest-vim-compiler.

sotte avatar sotte commented on July 18, 2024

@5long ya, the venv is activated of course, all the dependencies are picked up and whatnot. Thanks though!

from pytest-vim-compiler.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.