skip to navigation
skip to content

Not Logged In

sieve 0.1.9

XML Comparison Utils

Ripped from FormEncode and strainer just to support Pythons 2 and 3. Intended for use in your webapp test suites.

Build Status

Branch Status
master Build Status - master branch
develop Build Status - develop branch

For Example

There are two main functions you might care to use: eq_xml and in_xml:

>>> from sieve.operators import eq_xml, in_xml
>>> a = "<foo><bar>Value</bar></foo>"
>>> b = """
... <foo>
...     <bar>
...         Value
...     </bar>
... </foo>
... """
>>> eq_xml(a, b)
True
>>> c = "<html><body><foo><bar>Value</bar></foo></body></html"
>>> in_xml(a, c)  # 'needle' in a 'haystack'
True

There are also two sibling convenience functions: assert_eq_xml and assert_in_xml.

 
File Type Py Version Uploaded on Size
sieve-0.1.9.tar.gz (md5, pgp) Source 2013-09-11 5KB
  • Downloads (All Versions):
  • 27 downloads in the last day
  • 295 downloads in the last week
  • 989 downloads in the last month