repoze.lru not installed in test venv

Bug #1270602 reported by Eric Harney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Invalid
Undecided
Eric Harney

Bug Description

We seem to be missing "repoze" from test-requirements.

I ran "run_tests.sh -V" on a Fedora 20 machine and many tests fail with this exception.

======================================================================
FAIL: unittest.loader.ModuleImportFailure.cinder.tests.test_test
----------------------------------------------------------------------
Traceback (most recent call last):
_StringException: Traceback (most recent call last):
ImportError: Failed to import test module: cinder.tests.test_test
Traceback (most recent call last):
  File "/usr/lib64/python2.7/unittest/loader.py", line 252, in _find_tests
    module = self._get_module_from_name(name)
  File "/usr/lib64/python2.7/unittest/loader.py", line 230, in _get_module_from_name
    __import__(name)
  File "/home/emh/src/cinder/cinder/tests/test_test.py", line 21, in <module>
    from cinder import test
  File "/home/emh/src/cinder/cinder/test.py", line 42, in <module>
    from cinder import service
  File "/home/emh/src/cinder/cinder/service.py", line 41, in <module>
    from cinder import wsgi
  File "/home/emh/src/cinder/cinder/wsgi.py", line 34, in <module>
    import routes.middleware
  File "/home/emh/src/cinder/.venv/lib/python2.7/site-packages/routes/__init__.py", line 140, in <module>
    from routes.mapper import Mapper
  File "/home/emh/src/cinder/.venv/lib/python2.7/site-packages/routes/mapper.py", line 7, in <module>
    from repoze.lru import LRUCache
ImportError: No module named repoze.lru

Eric Harney (eharney)
summary: - repoze missing from test requirements
+ repoze.lru missing from test requirements
Revision history for this message
Eric Harney (eharney) wrote : Re: repoze.lru missing from test requirements

It looks like this is supposed to get pulled in as a dependency for Routes... unclear why this doesn't always happen.

Downloading/unpacking repoze.lru>=0.3 (from Routes>=1.12.3->-r /home/emh/src/cinder/requirements.txt (line 20))
  Downloading repoze.lru-0.6.tar.gz
  Running setup.py (path:/home/emh/src/cinder/.venv/build/repoze.lru/setup.py) egg_info for package repoze.lru

summary: - repoze.lru missing from test requirements
+ repoze.lru not installed in test venv
Revision history for this message
Eric Harney (eharney) wrote :

It appears that when installing requirements, the Routes package is installed into the venv before repoze.lru is. If you interrupt run_tests.sh at this point, and then re-run it (even with -U), Routes is considered "installed" and its dependencies are not checked, so the dependency is missing.

Changed in cinder:
assignee: nobody → Eric Harney (eharney)
Revision history for this message
Eric Harney (eharney) wrote :

This seems to be a deficiency in how pip handles requirements checking, despite it saying that "--upgrade" is recursive. Will revisit if I can find some way to improve this.

Changed in cinder:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.