shaunvxc / envy

:memo: safely make edits and sync local changes to files living in the site-packages of your virtualenvs
MIT License
39 stars 3 forks source link

Missing dependency for running tests #7

Closed erdnaxeli closed 8 years ago

erdnaxeli commented 8 years ago

When running tests, it complains about mock missing. So I added it to setup.py.

Beside, I specified the version as I think it's a good practice, you should specify them for the other dependencies to.

shaunvxc commented 8 years ago

@erdnaxeli

mock is listed in requirements.txt but if you don't run pip install -r requirements.txt (or, make install), then yes it will fail-- good catch! An alternative to this change would also be to update make test the Makefile to install the requirements before running the tests.

I'm happy to accept this PR, but right now the travis build fails because they seem to be using an older version of setuptools, and this causes issues for the most explicitly up-to-date version of mock.

How about we just require mock instead of explicitly requiring mock==1.3.0?

erdnaxeli commented 8 years ago

Oh I have not seen the "make install" , I have only done "pip install .", my bad.

For the setuptools problem, I got it too. Apparently setuptools don't know how to upgrade itself, so we cannot put it in the dependencies. Maybe without specifying the mock's version it will choose a one it can install, I will try it. Le 31 mars 2016 19:49, "Shaun Viguerie" notifications@github.com a écrit :

@erdnaxeli https://github.com/erdnaxeli

mock is listed in requirements.txt but if you don't run pip install -r requirements.txt (or, make install), then yes it will fail-- good catch! An alternative to this change would also be to update make test the Makefile to install the requirements before running the tests.

I'm happy to accept this PR, but right now the travis build fails because they seem to be using an older version of setuptools, and this causes issues for the most explicitly up-to-date version of mock.

How about we just require mock instead of explicitly requiring mock==1.3.0 ?

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/shaunvxc/envy/pull/7#issuecomment-204049406

shaunvxc commented 8 years ago

If we still have travis issues after that, we should just update the make test definition in theMakefile to install dependencies before running python setup.py test, and clearly document in the README that tests should be run using make test.

erdnaxeli commented 8 years ago

I have removed the version for mock in tests_require, it works for me and travis. This allow to run test without have to run make install. Maybe we can remove "install" from the Makefile (and requirements.txt) as it is now useless? (and never mentioned in the readme)

I also fix the Makefile for spaces / tabs, my make (4.1, Gentoo) was complaining about it.

shaunvxc commented 8 years ago

Looks good, thanks!

You make a good point about removing requirements.txt and install from the Makefile-- I had done it this way mainly because of common conventions that I typically follow.

I have removed install from the Makefile, but for now will keep requirements.txt (even though it is not needed)-- because I think some users refer right to this file to determine dependencies when looking at a project.