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

Miguel Angel Ajo Pelayo majopela at redhat.com
Wed Nov 19 05:56:34 UTC 2014


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 [blak111 at gmail.com]
Received: Wednesday, 19 Nov 2014, 5:18
To: OpenStack Development Mailing List (not for usage questions) [openstack-dev at 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 <damon.devops at gmail.com> 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 at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>


-- 
Kevin Benton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141119/a8a6f0ce/attachment.html>
-------------- next part --------------
_______________________________________________
OpenStack-dev mailing list
OpenStack-dev at lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


More information about the OpenStack-dev mailing list