Import mock so that it works on Python 3.x
Running oslotest's tests fail on Python 3.x because of the "import mock" lines in test_output.py and test_timeout.py. That works for 2.x because "mock" is an independent package, but in 3.x, it's a part of unittest in the standard library. This difference is covered in six.moves, which is where mock is imported from in other test modules. Change-Id: I3882c2a9be8abc93cf95942579cb9562c6377c01 Closes-Bug: #1607963
This commit is contained in:
parent
3fc3c96164
commit
425d465122
@ -16,7 +16,7 @@ import sys
|
|||||||
|
|
||||||
from oslotest import output
|
from oslotest import output
|
||||||
|
|
||||||
import mock
|
from six.moves import mock
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
from six.moves import mock
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from oslotest import timeout
|
from oslotest import timeout
|
||||||
|
Loading…
x
Reference in New Issue
Block a user