The current skip is fixable by using a stateful side effect - the only
reason the test ever worked before is that mock 1.0.1 returned the
same data from every read call, which was explicitly fixed in Python
3.4.
However one of the other 'fixes' was buggy: it works by making the
strings match up but the code under test can be broken by not doing
the second open/read and it will still pass : thus the test is invalid
and should be skipped to avoid incorrect coverage stats.
Reviewed: https:/ /review. openstack. org/204222 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=3f9927e399c 683efe099778b8f ecc1f2ac5447fd
Committed: https:/
Submitter: Jenkins
Branch: master
commit 3f9927e399c683e fe099778b8fecc1 f2ac5447fd
Author: Robert Collins <email address hidden>
Date: Wed Jul 22 06:59:30 2015 +1200
Fixup uses of mock in hyperv tests
I ended poking around a bit after mock 1.1.4.
The current skip is fixable by using a stateful side effect - the only
reason the test ever worked before is that mock 1.0.1 returned the
same data from every read call, which was explicitly fixed in Python
3.4.
However one of the other 'fixes' was buggy: it works by making the
strings match up but the code under test can be broken by not doing
the second open/read and it will still pass : thus the test is invalid
and should be skipped to avoid incorrect coverage stats.
Change-Id: Idec1b6b24e6d9d 4a7567ae1f7753b ffb9cb8bd5b
Closes-Bug: #1473401