yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #57689
[Bug 1632521] Re: tox -efunctional fails when tox picks python 3.x
Reviewed: https://review.openstack.org/385207
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=32e533d59abcd2ec27eebf174b492a75a85e7554
Submitter: Jenkins
Branch: master
commit 32e533d59abcd2ec27eebf174b492a75a85e7554
Author: melanie witt <melwittt@xxxxxxxxx>
Date: Tue Oct 11 23:59:25 2016 +0000
Always use python2.7 for functional tests
The functional testenv doesn't work with python 3.x on our codebase.
If someone is on a platform that defaults to python => python3,
functional tests will fail for them.
Closes-Bug: #1632521
Change-Id: I7bf6653f55c10d0a4f75054e519edf7da19c5c09
** Changed in: nova
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1632521
Title:
tox -efunctional fails when tox picks python 3.x
Status in OpenStack Compute (nova):
Fix Released
Bug description:
Currently, the functional tests can't be run with python 3.x and fail
with a trace like this:
Failed to import test module: nova.tests.functional.api_sample_tests.test_volumes
Traceback (most recent call last):
File "/home/ubuntu/nova/.tox/functional/lib/python3.5/site-packages/unittest2/loader.py", line 456, in _find_test_path
module = self._get_module_from_name(name)
File "/home/ubuntu/nova/.tox/functional/lib/python3.5/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
__import__(name)
File "/home/ubuntu/nova/nova/tests/functional/api_sample_tests/test_volumes.py", line 21, in <module>
from nova.tests.functional.api_sample_tests import test_servers
File "/home/ubuntu/nova/nova/tests/functional/api_sample_tests/test_servers.py", line 24, in <module>
class ServersSampleBase(api_sample_base.ApiSampleTestBaseV21):
File "/home/ubuntu/nova/nova/tests/functional/api_sample_tests/test_servers.py", line 29, in ServersSampleBase
user_data = base64.b64encode(user_data_contents)
File "/home/ubuntu/nova/.tox/functional/lib/python3.5/base64.py", line 59, in b64encode
encoded = binascii.b2a_base64(s)[:-1]
TypeError: a bytes-like object is required, not 'str'
The test run didn't actually run any tests
ERROR: InvocationError: '/bin/bash tools/pretty_tox.sh nova.tests.functional.db'
________________________________________________________________________________________________________________________________________ summary _________________________________________________________________________________________________________________________________________
ERROR: functional: commands failed
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1632521/+subscriptions
References