← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1260134] Re: in tests, many tests pass arguments to assertEqual backwards as (observed, expected) instead of (expected, observed)

 

I don't think a cleanup like this is worth it at all.

python unittest doesn't align with testtools here. unittest assertEqual
has no ordering, but testtools does.

http://docs.python.org/2/library/unittest.html#unittest.TestCase.assertEqual
https://github.com/testing-cabal/testtools/blob/master/testtools/testcase.py#L313

Furthermore unittests order is 'actual, expected' and testrools is
'expected, observed'. I assume 'actual'=='observed'.

http://docs.python.org/2/library/unittest.html#unittest.TestCase.assertItemsEqual

So with testtools contradicting unittests ordering,  and the inability
to automatically enforce this.  I think we we should just live with this
inconsistency.

** Changed in: nova
       Status: In Progress => Opinion

** Changed in: nova
       Status: Opinion => Invalid

-- 
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/1260134

Title:
  in tests, many tests pass arguments to assertEqual backwards as
  (observed,expected) instead of (expected, observed)

Status in OpenStack Compute (Nova):
  Invalid

Bug description:
  This is a minor bug but it will produce a very confusing error message
  if the test ever fails. Examples include but are not limited to
  nova.tests.api.openstack.compute.test_servers.

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


References