stale pyc's cause unit tests to fail

Bug #1471895 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Won't Fix
Undecided
Matt Riedemann

Bug Description

I hit this when running tox -r -e py27 on stable/juno because of stale pyc's in my environment:

Failed to import test module: ceilometer.tests.objectstore.test_swift
Traceback (most recent call last):
  File "/home/mriedem/git/ceilometer/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path
    module = self._get_module_from_name(name)
  File "/home/mriedem/git/ceilometer/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
    __import__(name)
  File "ceilometer/tests/objectstore/test_swift.py", line 28, in <module>
    from ceilometer.central import manager
  File "ceilometer/central/manager.py", line 40, in <module>
    class AgentManager(agent.AgentManager):
AttributeError: 'module' object has no attribute 'AgentManager'
Non-zero exit code (2) from test listing.
error: testr failed (3)
+ clean_exit
+ local error_code=1
+ rm -rf CEILO-MONGODB-Ljw5A
+ test -n ''
++ jobs -p
+ kill 11233 11283
+ return 1

We should delete *.pyc's in the tox venv before running tests.

Changed in ceilometer:
assignee: nobody → Matt Riedemann (mriedem)
status: New → In Progress
Revision history for this message
Matt Riedemann (mriedem) wrote :
tags: added: juno-backport-potential kilo-backport-potential
Julien Danjou (jdanjou)
Changed in ceilometer:
status: In Progress → Invalid
Revision history for this message
gordon chung (chungg) wrote :

i'm in same boat as Julien here. i think this topic was pretty divided when it was brought up[1]

[1] http://lists.openstack.org/pipermail/openstack-dev/2014-September/045845.html

Changed in ceilometer:
status: Invalid → Won't Fix
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ceilometer (master)

Change abandoned by Matt Riedemann (<email address hidden>) on branch: master
Review: https://review.openstack.org/198815
Reason: meh

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.