Re: [openstack-dev] [Neutron] Should we clean resource first then do assert in test?

2014-11-18 Thread Miguel Angel Ajo Pelayo
Correct,  

So,  it's better to keep tests clean of de resource cleanups for readability 
purposes and easier maintenance. 


Sent from my Android phone using TouchDown (www.nitrodesk.com)


-Original Message-
From: Kevin Benton [blak...@gmail.com]
Received: Wednesday, 19 Nov 2014, 5:18
To: OpenStack Development Mailing List (not for usage questions) 
[openstack-dev@lists.openstack.org]
Subject: Re: [openstack-dev] [Neutron] Should we clean resource first then do 
assert in test?

It's basically a style argument at this point. All resources are destroyed
at the DB level at the end of each test regardless of what happens.[1]

1.
https://github.com/openstack/neutron/blob/33c60c18cc78fb558ab8464c007559e44100ebba/neutron/tests/unit/testlib_api.py#L74

On Tue, Nov 18, 2014 at 7:36 PM, Damon Wang  wrote:

> Hi,
>
> @Michali asked me a question about clean resource after assert seems not
> valid in a review
> <https://review.openstack.org/#/c/124004/5/neutron/tests/unit/test_extension_allowedaddresspairs.py>
> .
>
> Should we clean resource before assert?
>
> Regards
> Wei Wang
>
>
> ___
> OpenStack-dev mailing list
> OpenStack-dev@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>


-- 
Kevin Benton
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Neutron] Should we clean resource first then do assert in test?

2014-11-18 Thread Kevin Benton
It's basically a style argument at this point. All resources are destroyed
at the DB level at the end of each test regardless of what happens.[1]

1.
https://github.com/openstack/neutron/blob/33c60c18cc78fb558ab8464c007559e44100ebba/neutron/tests/unit/testlib_api.py#L74

On Tue, Nov 18, 2014 at 7:36 PM, Damon Wang  wrote:

> Hi,
>
> @Michali asked me a question about clean resource after assert seems not
> valid in a review
> 
> .
>
> Should we clean resource before assert?
>
> Regards
> Wei Wang
>
>
> ___
> OpenStack-dev mailing list
> OpenStack-dev@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>


-- 
Kevin Benton
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [Neutron] Should we clean resource first then do assert in test?

2014-11-18 Thread Damon Wang
Hi,

@Michali asked me a question about clean resource after assert seems not
valid in a review

.

Should we clean resource before assert?

Regards
Wei Wang
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev