Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-26 Thread Nicolas Trangez
On Mon, 2014-11-24 at 13:19 -0500, Jay Pipes wrote: I think pointing out that the default failure message for testtools.TestCase.assertEqual() uses the terms reference (expected) and actual is a reason why reviewers *should* ask patch submitters to use (expected, actual) ordering. Is

Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-26 Thread Jay Pipes
On 11/26/2014 06:20 AM, Nicolas Trangez wrote: On Mon, 2014-11-24 at 13:19 -0500, Jay Pipes wrote: I think pointing out that the default failure message for testtools.TestCase.assertEqual() uses the terms reference (expected) and actual is a reason why reviewers *should* ask patch submitters to

Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-26 Thread Nicolas Trangez
On Wed, 2014-11-26 at 08:54 -0500, Jay Pipes wrote: On 11/26/2014 06:20 AM, Nicolas Trangez wrote: On Mon, 2014-11-24 at 13:19 -0500, Jay Pipes wrote: I think pointing out that the default failure message for testtools.TestCase.assertEqual() uses the terms reference (expected) and

Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-26 Thread Louis Taylor
On Wed, Nov 26, 2014 at 08:54:35AM -0500, Jay Pipes wrote: It's not about an equality condition. It's about the message that is produced by testtools.TestCase.assertEqual(), and the helpfulness of that message when the order of the arguments is reversed. This is especially true with large

Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-26 Thread Jay Pipes
On 11/26/2014 09:28 AM, Nicolas Trangez wrote: On Wed, 2014-11-26 at 08:54 -0500, Jay Pipes wrote: On 11/26/2014 06:20 AM, Nicolas Trangez wrote: On Mon, 2014-11-24 at 13:19 -0500, Jay Pipes wrote: I think pointing out that the default failure message for testtools.TestCase.assertEqual() uses

Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-26 Thread Ben Nemec
On 11/26/2014 07:54 AM, Jay Pipes wrote: On 11/26/2014 06:20 AM, Nicolas Trangez wrote: On Mon, 2014-11-24 at 13:19 -0500, Jay Pipes wrote: I think pointing out that the default failure message for testtools.TestCase.assertEqual() uses the terms reference (expected) and actual is a reason

Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-26 Thread Zane Bitter
On 26/11/14 09:33, Louis Taylor wrote: On Wed, Nov 26, 2014 at 08:54:35AM -0500, Jay Pipes wrote: It's not about an equality condition. It's about the message that is produced by testtools.TestCase.assertEqual(), and the helpfulness of that message when the order of the arguments is reversed.

Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-24 Thread Sahid Orentino Ferdjaoui
, November 21, 2014 5:57:14 PM Subject: Re: [openstack-dev] [nova] Proposal new hacking rules On Thu, Nov 20, 2014 at 02:00:11PM -0800, Joe Gordon wrote: On Thu, Nov 20, 2014 at 9:49 AM, Sahid Orentino Ferdjaoui sahid.ferdja...@redhat.com wrote: This is something we can call

Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-24 Thread Sahid Orentino Ferdjaoui
On Fri, Nov 21, 2014 at 05:23:28PM -0500, Matthew Treinish wrote: On Fri, Nov 21, 2014 at 04:15:07PM -0500, Sean Dague wrote: On 11/21/2014 01:52 PM, Matthew Treinish wrote: On Fri, Nov 21, 2014 at 07:15:49PM +0100, jordan pittier wrote: Hey, I am not a Nova developer but I still have

Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-24 Thread Sahid Orentino Ferdjaoui
On Fri, Nov 21, 2014 at 10:30:59AM -0800, Joe Gordon wrote: On Fri, Nov 21, 2014 at 8:57 AM, Sahid Orentino Ferdjaoui sahid.ferdja...@redhat.com wrote: On Thu, Nov 20, 2014 at 02:00:11PM -0800, Joe Gordon wrote: On Thu, Nov 20, 2014 at 9:49 AM, Sahid Orentino Ferdjaoui

Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-24 Thread Matthew Gilliard
1/ assertFalse() vs assertEqual(x, False) - these are semantically different because of python's notion of truthiness, so I don't think we ought to make this a rule. 2/ expected/actual - incorrect failure messages have cost me more time than I should admit to. I don't see any reason not to try to

Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-24 Thread Alexis Lee
Matthew Gilliard said on Mon, Nov 24, 2014 at 02:50:08PM +: 1/ assertFalse() vs assertEqual(x, False) - these are semantically different because of python's notion of truthiness, so I don't think we ought to make this a rule. 2/ expected/actual - I don't see any reason not to try to

Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-24 Thread Ben Nemec
On 11/24/2014 08:50 AM, Matthew Gilliard wrote: 1/ assertFalse() vs assertEqual(x, False) - these are semantically different because of python's notion of truthiness, so I don't think we ought to make this a rule. 2/ expected/actual - incorrect failure messages have cost me more time than I

Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-24 Thread pcrews
On 11/24/2014 09:40 AM, Ben Nemec wrote: On 11/24/2014 08:50 AM, Matthew Gilliard wrote: 1/ assertFalse() vs assertEqual(x, False) - these are semantically different because of python's notion of truthiness, so I don't think we ought to make this a rule. 2/ expected/actual - incorrect failure

Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-24 Thread Jay Pipes
On 11/24/2014 01:02 PM, pcrews wrote: On 11/24/2014 09:40 AM, Ben Nemec wrote: On 11/24/2014 08:50 AM, Matthew Gilliard wrote: 1/ assertFalse() vs assertEqual(x, False) - these are semantically different because of python's notion of truthiness, so I don't think we ought to make this a rule.

Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-23 Thread Solly Ross
Development Mailing List (not for usage questions) openstack-dev@lists.openstack.org Sent: Friday, November 21, 2014 5:23:28 PM Subject: Re: [openstack-dev] [nova] Proposal new hacking rules On Fri, Nov 21, 2014 at 04:15:07PM -0500, Sean Dague wrote: On 11/21/2014 01:52 PM, Matthew Treinish

Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-23 Thread Solly Ross
questions) openstack-dev@lists.openstack.org Sent: Friday, November 21, 2014 5:23:28 PM Subject: Re: [openstack-dev] [nova] Proposal new hacking rules On Fri, Nov 21, 2014 at 04:15:07PM -0500, Sean Dague wrote: On 11/21/2014 01:52 PM, Matthew Treinish wrote: On Fri, Nov 21, 2014 at 07:15

Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-21 Thread Sahid Orentino Ferdjaoui
On Thu, Nov 20, 2014 at 02:00:11PM -0800, Joe Gordon wrote: On Thu, Nov 20, 2014 at 9:49 AM, Sahid Orentino Ferdjaoui sahid.ferdja...@redhat.com wrote: This is something we can call nitpiking or low priority. This all seems like nitpicking for very little value. I think there are

Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-21 Thread Joe Gordon
On Fri, Nov 21, 2014 at 8:57 AM, Sahid Orentino Ferdjaoui sahid.ferdja...@redhat.com wrote: On Thu, Nov 20, 2014 at 02:00:11PM -0800, Joe Gordon wrote: On Thu, Nov 20, 2014 at 9:49 AM, Sahid Orentino Ferdjaoui sahid.ferdja...@redhat.com wrote: This is something we can call nitpiking

Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-21 Thread Matthew Treinish
On Fri, Nov 21, 2014 at 10:30:59AM -0800, Joe Gordon wrote: On Fri, Nov 21, 2014 at 8:57 AM, Sahid Orentino Ferdjaoui sahid.ferdja...@redhat.com wrote: On Thu, Nov 20, 2014 at 02:00:11PM -0800, Joe Gordon wrote: On Thu, Nov 20, 2014 at 9:49 AM, Sahid Orentino Ferdjaoui

Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-21 Thread Sean Dague
On 11/21/2014 01:52 PM, Matthew Treinish wrote: On Fri, Nov 21, 2014 at 07:15:49PM +0100, jordan pittier wrote: Hey, I am not a Nova developer but I still have an opinion. Using boolean assertions I like what you propose. We should use and enforce the assert* that best matches the

Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-21 Thread Matthew Treinish
On Fri, Nov 21, 2014 at 04:15:07PM -0500, Sean Dague wrote: On 11/21/2014 01:52 PM, Matthew Treinish wrote: On Fri, Nov 21, 2014 at 07:15:49PM +0100, jordan pittier wrote: Hey, I am not a Nova developer but I still have an opinion. Using boolean assertions I like what you propose. We

Re: [openstack-dev] [nova] Proposal new hacking rules

2014-11-20 Thread Joe Gordon
On Thu, Nov 20, 2014 at 9:49 AM, Sahid Orentino Ferdjaoui sahid.ferdja...@redhat.com wrote: This is something we can call nitpiking or low priority. This all seems like nitpicking for very little value. I think there are better things we can be focusing on instead of thinking of new ways to