Nova's test suite fails with python 2.7.2rc1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Undecided
|
Unassigned | ||
Python |
Invalid
|
Unknown
|
|||
nova (Ubuntu) |
Invalid
|
Medium
|
Unassigned | ||
python-mox (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
This is the error from the build log
=======
ERROR: test_compute_
-------
Traceback (most recent call last):
File "/build/
{'wait': wait_func})
File "/usr/lib/
new_mock = MockObject(
File "/usr/lib/
for method in dir(class_to_mock):
TypeError: __dir__() must return a list, not MockMethod
It turns out the semantics around __dir__ changed in 2.7.2. I'm guessing we're mocking a mock object, and MockAnything's __init__ calls dir(class_to_mock) which calls __dir__ which gets intercepted by __getattr__ (or maybe __call__ I'm not sure right now), which returns a MockMethod rather than a list.
summary: |
- Test suite fails with python 2.7.2rc1 + Nova's test suite fails with python 2.7.2rc1 |
Changed in nova (Ubuntu): | |
importance: | Undecided → Medium |
Changed in python: | |
status: | Unknown → New |
Changed in nova: | |
status: | New → Invalid |
Changed in nova (Ubuntu): | |
status: | New → Invalid |
Changed in python: | |
status: | New → Invalid |
I've not had time to whip up anything coherent to file a bug report upstream. If someone else wants to, please feel free to do so.