← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1775071] Re: functional tests string mismatch error in py35

 

** Changed in: glance
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1775071

Title:
  functional tests string mismatch error in py35

Status in Glance:
  Fix Released

Bug description:
  This happens for me locally when running 'tox -e functional-py35', but
  doesn't seem to happen in the gate:

  ==============================
  Failed 2 tests - output below:
  ==============================

  glance.tests.functional.test_glance_manage.TestGlanceManage.test_contract
  -------------------------------------------------------------------------

  Captured traceback:
  ~~~~~~~~~~~~~~~~~~~
      b'Traceback (most recent call last):'
      b'  File "/home/rosmabr/working/repos/glance/glance/tests/utils.py", line 168, in _runner'
      b'    func(*args, **kw)'
      b'  File "/home/rosmabr/working/repos/glance/glance/tests/utils.py", line 184, in wrapped'
      b'    func(*a, **kwargs)'
      b'  File "/home/rosmabr/working/repos/glance/glance/tests/functional/test_glance_manage.py", line 176, in test_contract'
      b"    self.assertIn('Database is up to date. No migrations needed.', out)"
      b'  File "/home/rosmabr/working/repos/glance/.tox/functional-py35/lib/python3.5/site-packages/testtools/testcase.py", line 417, in assertIn'
      b'    self.assertThat(haystack, Contains(needle), message)'
      b'  File "/home/rosmabr/working/repos/glance/.tox/functional-py35/lib/python3.5/site-packages/testtools/testcase.py", line 498, in assertThat'
      b'    raise mismatch_error'
      b"testtools.matchers._impl.MismatchError: 'Database is up to date. No migrations needed.' not in b'Database is up to date. No migrations needed.\\n'"
      b''

  glance.tests.functional.test_glance_manage.TestGlanceManage.test_expand
  -----------------------------------------------------------------------

  Captured traceback:
  ~~~~~~~~~~~~~~~~~~~
      b'Traceback (most recent call last):'
      b'  File "/home/rosmabr/working/repos/glance/glance/tests/utils.py", line 168, in _runner'
      b'    func(*args, **kw)'
      b'  File "/home/rosmabr/working/repos/glance/glance/tests/utils.py", line 184, in wrapped'
      b'    func(*a, **kwargs)'
      b'  File "/home/rosmabr/working/repos/glance/glance/tests/functional/test_glance_manage.py", line 137, in test_expand'
      b"    'No expansion needed.', out)"
      b'  File "/home/rosmabr/working/repos/glance/.tox/functional-py35/lib/python3.5/site-packages/testtools/testcase.py", line 417, in assertIn'
      b'    self.assertThat(haystack, Contains(needle), message)'
      b'  File "/home/rosmabr/working/repos/glance/.tox/functional-py35/lib/python3.5/site-packages/testtools/testcase.py", line 498, in assertThat'
      b'    raise mismatch_error'
      b"testtools.matchers._impl.MismatchError: 'Database expansion is up to date. No expansion needed.' not in b'Database expansion is up to date. No expansion needed.\\n'"
      b''

  The problematic line looks like this:
    assertIn('expected', actual)
  We can convert 'actual' to a string and then the comparison should work on both py27 and py35.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1775071/+subscriptions



References