← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1632521] [NEW] tox -efunctional fails when tox picks python 3.x

 

Public bug reported:

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

** Affects: nova
     Importance: Low
     Assignee: melanie witt (melwitt)
         Status: In Progress

-- 
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):
  In Progress

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


Follow ups