<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <br>
    <div class="moz-cite-prefix">On 09.12.2015 09:41, Lenka Doudova
      wrote:<br>
    </div>
    <blockquote cite="mid:5667E942.7030305@redhat.com" type="cite">Hi,
      <br>
      <br>
      attaching fixed patches for master and ipa-4-2 branch.
      <br>
      Also fixes test accordingly to
      <a class="moz-txt-link-freetext" href="https://fedorahosted.org/freeipa/ticket/5387">https://fedorahosted.org/freeipa/ticket/5387</a>.
      <br>
      <br>
      Lenka
      <br>
      <br>
      On 11/20/2015 12:13 PM, Martin Babinsky wrote:
      <br>
      <blockquote type="cite">On 11/19/2015 10:34 AM, Petr Viktorin
        wrote:
        <br>
        <blockquote type="cite">On 11/19/2015 09:30 AM, Lenka Doudova
          wrote:
          <br>
          <blockquote type="cite">On 11/18/2015 04:51 PM, Martin
            Babinsky wrote:
            <br>
            <blockquote type="cite">On 11/18/2015 02:16 PM, Lenka
              Doudova wrote:
              <br>
              <blockquote type="cite">Hi,
                <br>
                <br>
                here's a patch that adds a few comments to stageuser
                tests in order to
                <br>
                allow easier determining of a problem when tests fail.
                <br>
                <br>
                Lenka
                <br>
                <br>
                <br>
              </blockquote>
              <br>
              Hi Lenka,
              <br>
              <br>
              Firstly a technical detail: Python indexes lists from 0,
              so the
              <br>
              comments in 'options_ok' do not correctly map to the test
              names anyway.
              <br>
              <br>
              I am also not sure if this patch is worth reviewing and
              pushing as it
              <br>
              IMHO doesn't help in the identification of failed tests at
              all.
              <br>
              <br>
              This should be solved at more fundamental level.
              <br>
              <br>
            </blockquote>
            Ouch, good point, I didn't realize. Sorry.
            <br>
            <br>
            Anyway, the issue is that even if tests are run in verbose
            mode, you get
            <br>
            output like this:
            <br>
            <br>
            ipatests/test_xmlrpc/test_stageuser_plugin.py::TestStagedUser::test_create_attr[stageduser27]
            <br>
            PASSED
            <br>
            <br>
            ipatests/test_xmlrpc/test_stageuser_plugin.py::TestStagedUser::test_create_attr[stageduser28]
            <br>
            PASSED
            <br>
            <br>
            ipatests/test_xmlrpc/test_stageuser_plugin.py::TestStagedUser::test_create_attr[stageduser29]
            <br>
            PASSED
            <br>
            <br>
            ipatests/test_xmlrpc/test_stageuser_plugin.py::TestStagedUser::test_create_attr[stageduser210]
            <br>
            PASSED
            <br>
            <br>
            ipatests/test_xmlrpc/test_stageuser_plugin.py::TestStagedUser::test_create_attr[stageduser211]
            <br>
            PASSED
            <br>
            <br>
            ipatests/test_xmlrpc/test_stageuser_plugin.py::TestStagedUser::test_create_attr[stageduser212]
            <br>
            PASSED
            <br>
            <br>
            <br>
            If some test fails, you can't really tell which command was
            the one
            <br>
            responsible for the fail. This should be solved by
            <br>
            <a class="moz-txt-link-freetext" href="https://fedorahosted.org/freeipa/ticket/5449">https://fedorahosted.org/freeipa/ticket/5449</a>. Until that's
            done, though,
            <br>
            the only way to find out which command failed is looking at
            the code and
            <br>
            finding which parameters were put into the command, which
            was not much
            <br>
            possible without better commenting the test case (as I
            realized last
            <br>
            week when David Kupka asked me to help him find the reason
            for failed
            <br>
            tests).
            <br>
            Obviously I can rewrite the tests so there's 27 separate
            test cases, one
            <br>
            for each parameter, instead of one method that 'unwraps'
            into 27 test
            <br>
            cases, which would entirely eliminate the confusion. So far
            I don't know
            <br>
            of a way to put 27 similar test cases in one method which
            would allow
            <br>
            easy recognition of the test cases.
            <br>
            I'll wait with fixing the patch until further discussion.
            <br>
          </blockquote>
          <br>
          Hello,
          <br>
          Pytest wants you to be a bit more explicit about how to name
          the
          <br>
          parameters. (It "hides" dicts by default, because large dicts
          would make
          <br>
          the output even more confusing than the numbers.)
          <br>
          <br>
          Please try the attached patch.
          <br>
          Docs are at
          <a class="moz-txt-link-freetext" href="https://pytest.org/latest/fixture.html#parametrizing-a-fixture">https://pytest.org/latest/fixture.html#parametrizing-a-fixture</a>
          <br>
          <br>
          <br>
          <br>
        </blockquote>
        This looks like a better approach IMHO, you can then see which
        attribute/value was being checked.
        <br>
        <br>
        I would very much favor more descriptive test/fixture names in
        the beginning.
        <br>
        <br>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    Hello,<br>
    <br>
    we use usually bottom posting on freeipa-devel please try to keep
    reply in this way.<br>
    <br>
    Patch:<br>
    <br>
    I do not like the idea of separated lists, IMO it is hard to manage
    and is easy to create mistakes.<br>
    <br>
    How about this (untested, just from top of my head):
    <a class="moz-txt-link-freetext" href="http://fpaste.org/298994/65184014/">http://fpaste.org/298994/65184014/</a><br>
    <br>
    Martin<br>
  </body>
</html>