[TIP] Deps not working when pip install does

Aaron lists at whitehouse.kiwi.nz
Sat Jun 11 05:34:19 PDT 2016


I am a bit confused, because packages that I include in tox.ini as deps
appear to be included in my test runs, but I get test errors that I do
not get if I install them properly with sudo pip install [package]. Does
anybody know why? I would ideally like to make the tox.ini self
contained, so that anybody can download the project on a vanilla system
and all the tests pass.

For those who want more information, the project is duplicity.
Downloading the source and running the tests gave a bunch of pylint
errors about not being able to import packages, e.g.:
FAIL: test_pylint (testing.test_code.CodeTest)

Pylint test (requires pylint to be installed to pass)
Traceback (most recent call last):
line 86, in test_pylint
    [0, 32])
line 40, in run_checker
    self.assertTrue(process.returncode in returncodes, output)
AssertionError: ************* Module duplicity.backends._boto_single
[E0401(import-error), BotoBackend.__init__] Unable to import
************* Module duplicity.backends._cf_cloudfiles
[E0401(import-error), CloudFilesBackend._error_code] Unable to import

Adding boto and python-cloudfiles meant that they were listed in the
"py27 installed" list:
py27 installed:

but the error persisted. Installing those same two packages with sudo
pip install boto and sudo pip install python-cloudfiles fixed the error.

Any thoughts would be appreciated. Apologies if I'm misunderstanding
something about deps in tox.

Kind regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20160611/c74796fc/attachment.htm>

More information about the testing-in-python mailing list