[Freeipa-devel] [PATCH 0119] ipatests: Extend the order plugin to properly handle inheritance

Petr Viktorin pviktori at redhat.com
Wed Oct 16 11:57:42 UTC 2013


On 10/14/2013 04:28 PM, Tomas Babej wrote:
> Hi,
>
> When trying to create a new ordered test case by inheriting
> from already defined test case, by overriding few of its methods,
> the execution order of the tests is as follows:
>      - first all non-overriden test methods from the parent test class
>      - then all overriden tests methods

That is not strictly true: if the base class is defined in a different 
file, with larger line numbers, with this patch its tests would run last.

> This patch makes sure that methods are executed in the logical order,
> that is, the order defined in the parent class.

We'll also need to support longer inheritance chains than just one parent.
The sort should look at the first @ordered superclass where the method 
was defined, and run the methods defined at the beginning of the 
inheritance chain first.

I've modified your patch to accomplish this, does it look OK?

-- 
Petr³
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0119-ipatests-Extend-the-order-plugin-to-properly-handle-.patch
Type: text/x-patch
Size: 2317 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20131016/f1d63307/attachment.bin>


More information about the Freeipa-devel mailing list