<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 10/30/2013 02:09 PM, thierry bordaz
wrote:<br>
</div>
<blockquote cite="mid:52716761.1010006@redhat.com" type="cite">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<div class="moz-cite-prefix">On 10/30/2013 07:56 PM, Jan Rusnacko
wrote:<br>
</div>
<blockquote cite="mid:5271565E.2040105@redhat.com" type="cite">
<pre wrap="">Hello Thierry,
layout OK.
As for tests - instead of reinventing the wheel by defing class Test_standAlone
to set up instance, use py.test fixture.
Also, you should not force setup, test, teardown execution for each test by
specifying sub-methods for each test. Testing framework (py.test) should be
doing that. I think this will make your tests fail badly if some exception
occurs - if _test_ticket47560_setup raises exception, it will propagate back to
py.test and cleanup method will never be executed for that ticket.</pre>
</blockquote>
Hi Jan, <br>
<br>
thanks for you comments.<br>
py.test will call for for each test_ticketxxx<br>
<blockquote><tt>setup</tt><tt><br>
</tt><tt>test_ticketxxx</tt><tt><br>
</tt><tt>teardown</tt><tt><br>
</tt></blockquote>
<br>
setup will create the instance if it does not already exist, else
it provide a dirsrv to it.<br>
teardown will remove the instance if the test_ticketxx is not able
to properly clean it up (if test_ticketxx raise the clean_please
flag)<br>
test_ticketxxx will start it executions with clean_please=true
(set by setup), if it succeeds it set clean_please=false. Unless
it fails to properly clean up the instance. In that case it sets
clean_please to true.<br>
<br>
What would be the advantages to make the setup/teardown
sub-methods of the test_ticketxx ?<br>
At least a "small" drawback is that the person that write
test_ticketxxx will have to write them, instead of using the
"standard" one.<br>
</blockquote>
<br>
Can we have the test framework call a default setup/teardown method
if not provided by the test?<br>
<br>
<blockquote cite="mid:52716761.1010006@redhat.com" type="cite"> <br>
<blockquote cite="mid:5271565E.2040105@redhat.com" type="cite">
<pre wrap="">
Also, I believe each ticket should have its own file which contains one or more
testcases. I think that would reasonably group relevant things together.</pre>
</blockquote>
<br>
Right, it was my first intention. But then I had this idea to
group the tickets per deployment module. <br>
I don't know if it is a good idea, but it seems to be confusing <span
class="moz-smiley-s6"><span> :-[ </span></span><br>
<blockquote cite="mid:5271565E.2040105@redhat.com" type="cite">
<pre wrap="">
On 10/30/2013 05:57 PM, thierry bordaz wrote:
</pre>
<blockquote type="cite">
<pre wrap=""><a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://fedorahosted.org/389/attachment/ticket/47578/0001-Ticket-47578-CI-tests-removal-of-sudo-and-absolute-p.patch">https://fedorahosted.org/389/attachment/ticket/47578/0001-Ticket-47578-CI-tests-removal-of-sudo-and-absolute-p.patch</a>
--
389-devel mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:389-devel@lists.fedoraproject.org">389-devel@lists.fedoraproject.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://admin.fedoraproject.org/mailman/listinfo/389-devel">https://admin.fedoraproject.org/mailman/listinfo/389-devel</a>
</pre>
</blockquote>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">--
389-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:389-devel@lists.fedoraproject.org">389-devel@lists.fedoraproject.org</a>
<a class="moz-txt-link-freetext" href="https://admin.fedoraproject.org/mailman/listinfo/389-devel">https://admin.fedoraproject.org/mailman/listinfo/389-devel</a></pre>
</blockquote>
<br>
</body>
</html>