[Freeipa-devel] [PATCHES] 0684-0687 Use tracker fixture in host plugin tests

Tomas Babej tbabej at redhat.com
Wed Jan 14 12:13:28 UTC 2015


On 01/06/2015 03:49 PM, Petr Viktorin wrote:
> The first patch enables pylint to run on tests.
> Some of the exceptions I've added are pretty heavy-handed, but the
> main thing I wanted to enable is checking for duplicate test
> function/method names, since in that case the earlier test is silently
> dropped.
>
> I dropped support for old pylint while I was at it.
>
>
> The other three patches show how one might go around modernizing one
> of our Declarative test suites. There are some dead ends in the first
> patch that are removed subsequently; if you squash the patches
> together they might be easier to review.
> See the commit messages for what the patches do.
> The HostTracker should generalize well to other objects. With Service
> or DNS trackers some of the host tests can be simplified even more.
>
>
> To check that tests are independent, you can use the order-randomizing
> plugin for pytest (which is not in Fedora yet):
>
>     pip install --user pytest-random
>     ./make-test ipatests/test_xmlrpc/test_host_plugin.py -v --random
>
> (Note that this takes a lot of time as fixtures are created and
> re-created – independent tests are mainly useful for selecting
> *subsets* of tests.)
>

ACK, nice work!

Pushed to master: 07545569ecbdfdb1aeef6aa1878d827a7e5ddb38

Note: There was a build issue a fixed with attached patch, also pushed.

-- 
Tomas Babej
Associate Software Engineer | Red Hat | Identity Management
RHCE | Brno Site | IRC: tbabej | freeipa.org 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-tbabej-0297-spec-Add-BuildRequires-for-python-pytest-plugins.patch
Type: text/x-patch
Size: 1114 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20150114/f7924e4c/attachment.bin>


More information about the Freeipa-devel mailing list