You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Jimmy John (JIRA)" <qp...@incubator.apache.org> on 2007/06/10 23:09:25 UTC

[jira] Updated: (QPID-506) python client: Create a unit test for the qpid.xmlutil module

     [ https://issues.apache.org/jira/browse/QPID-506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jimmy John updated QPID-506:
----------------------------

    Attachment: xmlutil.py
                xmlutil.py

Attached are the unit test case module and the qpid.xmlutils module.

Unit test case
----------------------
17 test cases have been generated. All tests pass. Refer to the __doc__ string within the code for executing instructions.

qpid.xmlutils
-------------------
The following changes have been made to the code:

1. Added doc strings for all functions
2 Added __str__, __repr__, prettyPrint, prepareForPrettyPrint functions for the Node class
3. Modified Node class to add a new member '_visited'

    The new function prettyPrint() performs a depth first traversal of the node heirarchy and prints out a tree like representation. e.g. the following xml:

<field name = "immediate" domain = "bit" label = "request immediate delivery">
   <doc>dummy doc14 text</doc>
   <!-- Rule test name: was "amq_stream_00" -->    
    <rule name = "01">
        <doc>dummy doc15 text</doc>
        <dummytag>dummy text</dummytag>
     </rule>
</field>

would yield:


field[(u'domain', u'bit'), (u'name', u'immediate'), (u'label', u'request immediate delivery')]

        doc ==> dummy doc14 text
        rule[(u'name', u'01')]
                doc ==> dummy doc15 text
                dummytag ==> dummy text




> python client: Create a unit test for the qpid.xmlutil module
> -------------------------------------------------------------
>
>                 Key: QPID-506
>                 URL: https://issues.apache.org/jira/browse/QPID-506
>             Project: Qpid
>          Issue Type: Test
>          Components: Python Client
>            Reporter: Jimmy John
>            Priority: Minor
>         Attachments: xmlutil.py, xmlutil.py
>
>
> Create a unit test for the qpid.xmlutil module.
> Some new functions to print out the contents of a node, showing the contents of all it's child nodes, would help while debugging issues etc.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.