Unit test: self.assertNotEqual in unit.test_base.BaseTest.test_eq does not work in PY2

Bug #1586268 reported by Yafei Yu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Kosmos
New
Undecided
Unassigned
Panko
Fix Released
Undecided
Hanxi Liu
daisycloud-core
New
Undecided
Unassigned
octavia
Fix Released
Low
Ji.Wei
python-congressclient
Fix Released
Undecided
Yafei Yu
python-karborclient
Fix Released
Undecided
Yafei Yu
python-muranoclient
Fix Released
Undecided
Yafei Yu
taskflow
Fix Released
Undecided
Ji.Wei

Bug Description

Version: master(20160527)

In case cinderclient.tests.unit.test_base.BaseTest.test_eq self.assertNotEqual does not work.
Class base.Resource defines __eq__() built-in function, but does not define __ne__() built-in function, so self.assertEqual works but self.assertNotEqual does not work at all in this test case.

steps:
1 Clone code of python-cinderclient from master.
2 Modify the case of unit test: cinderclient/tests/unit/test_base.py
  line50--line62.
    def test_eq(self):
        # Two resources with same ID: never equal if their info is not equal
        r1 = base.Resource(None, {'id': 1, 'name': 'hi'})
        r2 = base.Resource(None, {'id': 1, 'name': 'hello'})
        self.assertNotEqual(r1, r2)

        # Two resources with same ID: equal if their info is equal
        r1 = base.Resource(None, {'id': 1, 'name': 'hello'})
        r2 = base.Resource(None, {'id': 1, 'name': 'hello'})
        # self.assertEqual(r1, r2)
        self.assertNotEqual(r1, r2)

        # Two resoruces of different types: never equal
        r1 = base.Resource(None, {'id': 1})
        r2 = volumes.Volume(None, {'id': 1})
        self.assertNotEqual(r1, r2)

        # Two resources with no ID: equal if their info is equal
        r1 = base.Resource(None, {'name': 'joe', 'age': 12})
        r2 = base.Resource(None, {'name': 'joe', 'age': 12})
        # self.assertEqual(r1, r2)
        self.assertNotEqual(r1, r2)

   Modify self.assertEqual(r1, r2) to self.assertNotEqual(r1, r2).

3 Run unit test, and return success.

After that, I make a test:

class Resource(object):
    def __init__(self, person):
        self.person = person

    def __eq__(self, other):
        return self.person == other.person

r1 = Resource("test")
r2 = Resource("test")
r3 = Resource("test_r3")
r4 = Resource("test_r4")

print r1 != r2
print r1 == r2
print r3 != r4
print r3 == r4

The result is :
True
True
True
False

Whether r1 is precisely the same to r2 or not, self.assertNotEqual(r1, r2) return true.So I think self.assertNotEqual doesn't work at all in python2 and should be modified.

Tags: tests
Yafei Yu (yu-yafei)
tags: added: unittest
Yafei Yu (yu-yafei)
description: updated
Changed in python-cinderclient:
assignee: nobody → jingtao liang (liang-jingtao)
Changed in python-cinderclient:
status: New → In Progress
Yafei Yu (yu-yafei)
description: updated
description: updated
Eric Harney (eharney)
tags: added: tests
removed: unittest
Yafei Yu (yu-yafei)
Changed in python-cinderclient:
assignee: jingtao liang (liang-jingtao) → yuyafei (yu-yafei)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-cinderclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/322376

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-cinderclient (master)

Change abandoned by yuyafei (<email address hidden>) on branch: master
Review: https://review.openstack.org/322376

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-cinderclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/322408

Yafei Yu (yu-yafei)
description: updated
summary: - Unit test: unit.test_base.BaseTest.test_eq does not work
+ Unit test: self.assertNotEqual in unit.test_base.BaseTest.test_eq does
+ not work
Yafei Yu (yu-yafei)
description: updated
Yafei Yu (yu-yafei)
description: updated
Yafei Yu (yu-yafei)
description: updated
Yafei Yu (yu-yafei)
description: updated
Yafei Yu (yu-yafei)
description: updated
Yafei Yu (yu-yafei)
Changed in python-novaclient:
assignee: nobody → yuyafei (yu-yafei)
Changed in python-keystoneclient:
assignee: nobody → yuyafei (yu-yafei)
Changed in python-heatclient:
assignee: nobody → yuyafei (yu-yafei)
Changed in python-manilaclient:
assignee: nobody → yuyafei (yu-yafei)
summary: Unit test: self.assertNotEqual in unit.test_base.BaseTest.test_eq does
- not work
+ not work in PY2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/337012

Changed in python-novaclient:
status: New → In Progress
Yafei Yu (yu-yafei)
Changed in python-glanceclient:
assignee: nobody → yuyafei (yu-yafei)
Changed in python-troveclient:
assignee: nobody → yuyafei (yu-yafei)
Changed in python-muranoclient:
assignee: nobody → yuyafei (yu-yafei)
Ji.Wei (jiwei)
Changed in tempest:
assignee: nobody → Ji.Wei (jiwei)
Changed in nova:
assignee: nobody → Ji.Wei (jiwei)
Changed in ceilometer:
assignee: nobody → Ji.Wei (jiwei)
Changed in neutron:
assignee: nobody → Ji.Wei (jiwei)
Changed in swift:
assignee: nobody → Ji.Wei (jiwei)
Changed in rally:
assignee: nobody → Ji.Wei (jiwei)
Yafei Yu (yu-yafei)
Changed in python-congressclient:
assignee: nobody → yuyafei (yu-yafei)
Ji.Wei (jiwei)
Changed in python-congressclient:
assignee: yuyafei (yu-yafei) → Ji.Wei (jiwei)
Yafei Yu (yu-yafei)
Changed in python-smaugclient:
assignee: nobody → yuyafei (yu-yafei)
Ji.Wei (jiwei)
Changed in python-congressclient:
assignee: Ji.Wei (jiwei) → nobody
Yafei Yu (yu-yafei)
no longer affects: cloudkitty
Ji.Wei (jiwei)
Changed in daisycloud-core:
assignee: nobody → Ji.Wei (jiwei)
Changed in keystonemiddleware:
assignee: nobody → Ji.Wei (jiwei)
Changed in keystone:
assignee: nobody → Ji.Wei (jiwei)
Changed in heat:
assignee: nobody → Ji.Wei (jiwei)
Ji.Wei (jiwei)
Changed in glance:
assignee: nobody → Ji.Wei (jiwei)
Yafei Yu (yu-yafei)
Changed in python-ceilometerclient:
assignee: nobody → yuyafei (yu-yafei)
Changed in python-congressclient:
assignee: nobody → yuyafei (yu-yafei)
Ji.Wei (jiwei)
Changed in cinder:
assignee: nobody → Ji.Wei (jiwei)
Changed in python-swiftclient:
assignee: nobody → Ji.Wei (jiwei)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-heatclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/337031

Changed in python-heatclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-ceilometerclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/337033

Changed in python-ceilometerclient:
status: New → In Progress
Yafei Yu (yu-yafei)
no longer affects: python-cloudkittyclient (Ubuntu)
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

I think this is true. I executed this piece of code under different python
versions:

    class Resource(object):
    def __init__(self, person):
        self.person = person

    def __eq__(self, other):
        return self.person == other.person

    r1 = Resource("test")
    r2 = Resource("test")
    r3 = Resource("test_r3")
    r4 = Resource("test_r4")

    print(r1 != r2)
    print(r1 == r2)
    print(r3 != r4)
    print(r3 == r4)

Python 2.7.10 Python 3.5.1
------------------------------
        True False
        True True
        True True
        False False

Also, The python3 doc [1] says:

    "By default, __ne__() delegates to __eq__() and inverts the result
    unless it is NotImplemented. There are no other implied relationships
    among the comparison operators"

whereas the python2 doc [2] says:

    "There are no implied relationships among the comparison operators."

I think this behavior change got introduced in python with [3]. As long as
we support python2, a change seems to be reasonable.

References:
[1] https://docs.python.org/3/reference/datamodel.html#object.__ne__
[2] https://docs.python.org/2.7/reference/datamodel.html#object.__ne__
[3] http://bugs.python.org/issue21408

Changed in nova:
importance: Undecided → High
status: New → Confirmed
Ji.Wei (jiwei)
Changed in horizon:
assignee: nobody → Ji.Wei (jiwei)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/337394

Changed in nova:
assignee: Ji.Wei (jiwei) → yuyafei (yu-yafei)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-heatclient (master)

Reviewed: https://review.openstack.org/337031
Committed: https://git.openstack.org/cgit/openstack/python-heatclient/commit/?id=4c2a88b95905ab724a5fff5b19ff10c1ca43f4a3
Submitter: Jenkins
Branch: master

commit 4c2a88b95905ab724a5fff5b19ff10c1ca43f4a3
Author: yuyafei <email address hidden>
Date: Mon Jul 4 16:17:51 2016 +0800

    base.Resource not define __ne__() built-in function

    Class base.Resource defines __eq__() built-in function, but does
    not define __ne__() built-in function, so self.assertEqual works
    but self.assertNotEqual does not work at all in this test case in
    python2. This patch fixes it by defining __eq__() built-in function
    of class base.Resource.

    Change-Id: I13ed9ddd6ae6ef074232b33695916bc83930dcf0
    Closes-Bug: #1586268

Changed in python-heatclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/337429

Changed in python-glanceclient:
status: New → In Progress
Changed in python-congressclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-congressclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/337432

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-keystoneclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/337435

Changed in python-keystoneclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-muranoclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/337439

Changed in python-muranoclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-smaugclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/337445

Changed in python-smaugclient:
status: New → In Progress
Changed in python-troveclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-troveclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/337447

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/337602

Changed in glance:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-cinderclient (master)

Reviewed: https://review.openstack.org/322408
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=ccde9b3ba78e2dd0f2a726e6d23dba91f8ee061f
Submitter: Jenkins
Branch: master

commit ccde9b3ba78e2dd0f2a726e6d23dba91f8ee061f
Author: yuyafei <email address hidden>
Date: Sat May 28 16:10:15 2016 +0800

    base.Resource not define __ne__() built-in function

    Class base.Resource defines __eq__() built-in function, but does
    not define __ne__() built-in function, so self.assertEqual works
    but self.assertNotEqual does not work at all in this test case in
    python2. This patch fixes it by defining __ne__() built-in function
    of class base.Resource. Also fixes spelling errors:resoruces.

    Change-Id: I845d531880ad74d928a3e15335ed10e71590826e
    Closes-Bug: #1586268

Changed in python-cinderclient:
status: In Progress → Fix Released
Ji.Wei (jiwei)
no longer affects: cinder
no longer affects: keystone
Ji.Wei (jiwei)
no longer affects: rally
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by yuyafei (<email address hidden>) on branch: master
Review: https://review.openstack.org/337394

Yafei Yu (yu-yafei)
Changed in nova:
assignee: yuyafei (yu-yafei) → Ji.Wei (jiwei)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on glance (master)

Change abandoned by JiWei (<email address hidden>) on branch: master
Review: https://review.openstack.org/337602

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-muranoclient (master)

Reviewed: https://review.openstack.org/337439
Committed: https://git.openstack.org/cgit/openstack/python-muranoclient/commit/?id=04e0e1e553c37114a4292af5e82642cdc6104555
Submitter: Jenkins
Branch: master

commit 04e0e1e553c37114a4292af5e82642cdc6104555
Author: yuyafei <email address hidden>
Date: Tue Jul 5 15:31:54 2016 +0800

    Add __ne__ built-in function

    In Python 3 __ne__ by default delegates to __eq__ and inverts the
    result, but in Python 2 they urge you to define __ne__ when you
    define __eq__ for it to work properly [1].There are no implied
    relationships among the comparison operators. The truth of x==y
    does not imply that x!=y is false. Accordingly, when defining
    __eq__(), one should also define __ne__() so that the operators
    will behave as expected.
    [1]https://docs.python.org/2/reference/datamodel.html#object.__ne__

    Change-Id: Ia6c59f690917a7a39d02072ceb339779296bdb91
    Closes-Bug: #1586268

Changed in python-muranoclient:
status: In Progress → Fix Released
Changed in python-novaclient:
assignee: yuyafei (yu-yafei) → Andrey Kurilin (andreykurilin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/337012
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=55201c55a8d74fc49fe8e6359d54d5b4c2303e1c
Submitter: Jenkins
Branch: master

commit 55201c55a8d74fc49fe8e6359d54d5b4c2303e1c
Author: yuyafei <email address hidden>
Date: Mon Jul 4 15:30:56 2016 +0800

    base.Resource not define __ne__() built-in function

    Class base.Resource defines __eq__() built-in function, but does
    not define __ne__() built-in function, so self.assertEqual works
    but self.assertNotEqual does not work at all in this test case in
    python2. This patch fixes it by defining __ne__() built-in function
    of class base.Resource. Also fixes spelling errors:resoruces.

    Change-Id: I39e6f6b94e9490afc14143208e6f20b0ef960991
    Closes-Bug: #1586268

Changed in python-novaclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/340248

Ji.Wei (jiwei)
no longer affects: glance
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-ceilometerclient (master)

Reviewed: https://review.openstack.org/337033
Committed: https://git.openstack.org/cgit/openstack/python-ceilometerclient/commit/?id=f97de95a638347993545686ac9c225d831838340
Submitter: Jenkins
Branch: master

commit f97de95a638347993545686ac9c225d831838340
Author: yuyafei <email address hidden>
Date: Mon Jul 4 16:23:12 2016 +0800

    base.Resource not define __ne__() built-in function

    Class base.Resource defines __eq__() built-in function, but does
    not define __ne__() built-in function, so self.assertEqual works
    but self.assertNotEqual does not work at all in this test case in
    python2. This patch fixes it by defining __eq__() built-in function
    of class base.Resource. Also fixes spelling errors:resoruces.

    Change-Id: I8a4e09e277a14a16105feab81ba8d07ceee5b47f
    Closes-Bug: #1586268

Changed in python-ceilometerclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master
Review: https://review.openstack.org/342016

Changed in tempest:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (master)

Fix proposed to branch: master
Review: https://review.openstack.org/342035

Changed in ceilometer:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-troveclient (master)

Change abandoned by yuyafei (<email address hidden>) on branch: master
Review: https://review.openstack.org/337447
Reason: Jenkins-1

Ji.Wei (jiwei)
no longer affects: swift
no longer affects: python-swiftclient
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-heatclient 1.3.0

This issue was fixed in the openstack/python-heatclient 1.3.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/342035
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=5cebb31c09ba408baf6bdda075cd0cc2c754a388
Submitter: Jenkins
Branch: master

commit 5cebb31c09ba408baf6bdda075cd0cc2c754a388
Author: Ji-Wei <email address hidden>
Date: Thu Jul 14 17:33:11 2016 +0800

    base.Resource not define __ne__() built-in function

    Class base.Resource defines __eq__() built-in function, but does
    not define __ne__() built-in function, so self.assertEqual works
    but self.assertNotEqual does not work at all in this test case in
    python2. This patch fixes it.

    Change-Id: I819cb27664661e0b67d1e886c28432a2d1134cb0
    Closes-Bug: #1586268

Changed in ceilometer:
status: In Progress → Fix Released
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/ceilometer 7.0.0.0b2

This issue was fixed in the openstack/ceilometer 7.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/343133

Changed in neutron:
status: New → In Progress
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/python-novaclient 5.0.0

This issue was fixed in the openstack/python-novaclient 5.0.0 release.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/ceilometer 7.0.0.0b2

This issue was fixed in the openstack/ceilometer 7.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-smaugclient (master)

Reviewed: https://review.openstack.org/337445
Committed: https://git.openstack.org/cgit/openstack/python-smaugclient/commit/?id=7b16de4908371cad5c1544551132eac34758315f
Submitter: Jenkins
Branch: master

commit 7b16de4908371cad5c1544551132eac34758315f
Author: yuyafei <email address hidden>
Date: Tue Jul 5 15:37:56 2016 +0800

    Add __ne__ built-in function

    In Python 3 __ne__ by default delegates to __eq__ and inverts the
    result, but in Python 2 they urge you to define __ne__ when you
    define __eq__ for it to work properly [1].There are no implied
    relationships among the comparison operators. The truth of x==y
    does not imply that x!=y is false. Accordingly, when defining
    __eq__(), one should also define __ne__() so that the operators
    will behave as expected.
    [1]https://docs.python.org/2/reference/datamodel.html#object.__ne__

    Change-Id: Iae22095146e64081f362601665284b43d0056f48
    Closes-Bug: #1586268

Changed in python-smaugclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-congressclient (master)

Reviewed: https://review.openstack.org/337432
Committed: https://git.openstack.org/cgit/openstack/python-congressclient/commit/?id=ec6abb3dbe49d704372b07f4fca6918fd00324fe
Submitter: Jenkins
Branch: master

commit ec6abb3dbe49d704372b07f4fca6918fd00324fe
Author: yuyafei <email address hidden>
Date: Tue Jul 5 15:12:38 2016 +0800

    Add __ne__ built-in function

    In Python 3 __ne__ by default delegates to __eq__ and inverts the
    result, but in Python 2 they urge you to define __ne__ when you
    define __eq__ for it to work properly [1].There are no implied
    relationships among the comparison operators. The truth of x==y
    does not imply that x!=y is false. Accordingly, when defining
    __eq__(), one should also define __ne__() so that the operators
    will behave as expected.
    [1]https://docs.python.org/2/reference/datamodel.html#object.__ne__

    Change-Id: I50234892bd3dadcda533d97c03414067e06ef0f4
    Closes-Bug: #1586268

Changed in python-congressclient:
status: In Progress → Fix Released
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/python-ceilometerclient 2.5.0

This issue was fixed in the openstack/python-ceilometerclient 2.5.0 release.

Revision history for this message
NidhiMittalHada (nidhimittal19) wrote :

Can i work on this?

Changed in python-manilaclient:
assignee: yuyafei (yu-yafei) → NidhiMittalHada (nidhimittal19)
no longer affects: keystonemiddleware
no longer affects: python-keystoneclient
Revision history for this message
Yafei Yu (yu-yafei) wrote :
Changed in python-keystoneclient:
assignee: nobody → yuyafei (yu-yafei)
status: New → In Progress
Revision history for this message
Yafei Yu (yu-yafei) wrote :

Yes, NidhiMittalHada.

Yafei Yu (yu-yafei)
no longer affects: python-troveclient
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-muranoclient 0.10.0

This issue was fixed in the openstack/python-muranoclient 0.10.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (master)

Reviewed: https://review.openstack.org/337435
Committed: https://git.openstack.org/cgit/openstack/python-keystoneclient/commit/?id=ef34175095d92a117fda149ad8a2e216e3a2b78c
Submitter: Jenkins
Branch: master

commit ef34175095d92a117fda149ad8a2e216e3a2b78c
Author: yuyafei <email address hidden>
Date: Tue Jul 5 15:21:02 2016 +0800

    Add __ne__ built-in function

    In Python 3 __ne__ by default delegates to __eq__ and inverts the
    result, but in Python 2 they urge you to define __ne__ when you
    define __eq__ for it to work properly [1].There are no implied
    relationships among the comparison operators. The truth of x==y
    does not imply that x!=y is false. Accordingly, when defining
    __eq__(), one should also define __ne__() so that the operators
    will behave as expected.
    [1]https://docs.python.org/2/reference/datamodel.html#object.__ne__
    Also fixes spelling errors:resoruces.

    Change-Id: Iae4ce0fe84fae810711cc8c3fdb94eb9ca1d772e
    Closes-Bug: #1586268

Changed in python-keystoneclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-manilaclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/355157

Changed in python-manilaclient:
assignee: NidhiMittalHada (nidhimittal19) → yuyafei (yu-yafei)
status: New → In Progress
Hanxi Liu (hanxi-liu)
Changed in panko:
assignee: nobody → Hanxi Liu (hanxi-liu)
Changed in gnocchi:
assignee: nobody → Hanxi Liu (hanxi-liu)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to panko (master)

Fix proposed to branch: master
Review: https://review.openstack.org/359293

Changed in panko:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to gnocchi (master)

Fix proposed to branch: master
Review: https://review.openstack.org/359321

Changed in gnocchi:
status: New → In Progress
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/python-keystoneclient 3.5.0

This issue was fixed in the openstack/python-keystoneclient 3.5.0 release.

Ji.Wei (jiwei)
Changed in octavia:
assignee: nobody → Ji.Wei (jiwei)
Changed in kosmos:
assignee: nobody → Ji.Wei (jiwei)
Ji.Wei (jiwei)
Changed in taskflow:
assignee: nobody → Ji.Wei (jiwei)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to taskflow (master)

Fix proposed to branch: master
Review: https://review.openstack.org/363488

Changed in taskflow:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to taskflow (master)

Reviewed: https://review.openstack.org/363488
Committed: https://git.openstack.org/cgit/openstack/taskflow/commit/?id=e26f09e0d14d7a1a763596dd8a6029237e5ce530
Submitter: Jenkins
Branch: master

commit e26f09e0d14d7a1a763596dd8a6029237e5ce530
Author: Ji-Wei <email address hidden>
Date: Wed Aug 31 18:23:25 2016 +0800

    Some classes not define __ne__() built-in function

    Some classes defines __eq__() built-in function, but does
    not define __ne__() built-in function, so self.assertEqual works
    but self.assertNotEqual does not work at all in this test case in
    python2. This patch fixes it.

    Change-Id: I3e4f213081268bad44583a63a84795d39094117f
    Closes-Bug: #1586268

Changed in taskflow:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-congressclient 1.5.0

This issue was fixed in the openstack/python-congressclient 1.5.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-cinderclient 1.9.0

This issue was fixed in the openstack/python-cinderclient 1.9.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/342016
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=79f5efd4687224519cd22b98b4f37b2832b1aae5
Submitter: Jenkins
Branch: master

commit 79f5efd4687224519cd22b98b4f37b2832b1aae5
Author: Ji-Wei <email address hidden>
Date: Thu Jul 14 16:58:43 2016 +0800

    Class Credentials not define __ne__() built-in function

    Class Credentials defines __eq__() built-in function, but does
    not define __ne__() built-in function, so self.assertEqual works
    but self.assertNotEqual does not work at all in this test case in
    python2. This patch fixes it.

    Change-Id: I2c0d9d6202d64de57700ceb7c15db8ed3ad7e8ff
    Closes-Bug: #1586268

Changed in tempest:
status: In Progress → Fix Released
Julien Danjou (jdanjou)
no longer affects: gnocchi
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to panko (master)

Reviewed: https://review.openstack.org/359293
Committed: https://git.openstack.org/cgit/openstack/panko/commit/?id=02d16e5f70d55173089832a4284ab75dbc4376a4
Submitter: Jenkins
Branch: master

commit 02d16e5f70d55173089832a4284ab75dbc4376a4
Author: Hanxi <email address hidden>
Date: Tue Aug 23 20:48:43 2016 +0800

    Base.Model not define __ne__() built-in function

    Class base.Model defines __eq__() built-in function, but does
    not define __ne__() built-in function, so self.assertEqual works
    but self.assertNotEqual does not work at all in this test case in
    python2. This patch fixes it.

    Change-Id: I22e6b8e067638e148923e7a72aa8bfdc5f29b6df
    Closes-Bug: #1586268

Changed in panko:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-manilaclient (master)

Reviewed: https://review.openstack.org/355157
Committed: https://git.openstack.org/cgit/openstack/python-manilaclient/commit/?id=ee60b3aabe1fe7de3527c2a8a18f1769d2338b7e
Submitter: Jenkins
Branch: master

commit ee60b3aabe1fe7de3527c2a8a18f1769d2338b7e
Author: yuyafei <email address hidden>
Date: Sat Aug 13 15:42:08 2016 +0800

    Add __ne__ built-in function

    In Python 3 __ne__ by default delegates to __eq__ and inverts the
    result, but in Python 2 they urge you to define __ne__ when you
    define __eq__ for it to work properly [1].There are no implied
    relationships among the comparison operators. The truth of x==y
    does not imply that x!=y is false. Accordingly, when defining
    __eq__(), one should also define __ne__() so that the operators
    will behave as expected.
    [1]https://docs.python.org/2/reference/datamodel.html#object.__ne__

    Without the change in base.py, if r1==r2, the follow code should all
    pass.
        self.assertEqual(r1, r2)
        self.assertNotEqual(r1, r2)
    The change here is for a way to self.assertNotEqual(r1, r2) as
    expected.

    Change-Id: I72485d38eab8b5a2034a621e1eebf33b86832f35
    Closes-Bug: #1586268

Changed in python-manilaclient:
status: In Progress → Fix Released
no longer affects: neutron
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-cinderclient 1.9.0

This issue was fixed in the openstack/python-cinderclient 1.9.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-keystoneclient 3.5.0

This issue was fixed in the openstack/python-keystoneclient 3.5.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-cinderclient 1.9.0

This issue was fixed in the openstack/python-cinderclient 1.9.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-keystoneclient 3.5.0

This issue was fixed in the openstack/python-keystoneclient 3.5.0 release.

Revision history for this message
Michael Johnson (johnsom) wrote :
Changed in octavia:
importance: Undecided → Low
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/taskflow 2.7.0

This issue was fixed in the openstack/taskflow 2.7.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-glanceclient (master)

Change abandoned by yuyafei (<email address hidden>) on branch: master
Review: https://review.openstack.org/337429

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-cinderclient 1.9.0

This issue was fixed in the openstack/python-cinderclient 1.9.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-congressclient 1.5.0

This issue was fixed in the openstack/python-congressclient 1.5.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-keystoneclient 3.5.0

This issue was fixed in the openstack/python-keystoneclient 3.5.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/taskflow 2.7.0

This issue was fixed in the openstack/taskflow 2.7.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-cinderclient 1.9.0

This issue was fixed in the openstack/python-cinderclient 1.9.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-congressclient 1.5.0

This issue was fixed in the openstack/python-congressclient 1.5.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-keystoneclient 3.5.0

This issue was fixed in the openstack/python-keystoneclient 3.5.0 release.

Revision history for this message
Sean Dague (sdague) wrote :

Please never ever open bugs like this

no longer affects: nova
no longer affects: ceilometer
no longer affects: heat
no longer affects: python-novaclient
no longer affects: tempest
no longer affects: python-manilaclient
no longer affects: python-keystoneclient
no longer affects: python-heatclient
no longer affects: python-cinderclient
no longer affects: python-ceilometerclient
no longer affects: python-barbicanclient
no longer affects: horizon
no longer affects: python-glanceclient
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-manilaclient 1.12.0

This issue was fixed in the openstack/python-manilaclient 1.12.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/panko 2.0.0

This issue was fixed in the openstack/panko 2.0.0 release.

Ji.Wei (jiwei)
Changed in kosmos:
assignee: Ji.Wei (jiwei) → nobody
Changed in daisycloud-core:
assignee: Ji.Wei (jiwei) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.