def assert_is_valid_xml(output):
 try:
  to_xml(output)
 except Exception as e:
  raise AssertionError(('Expected valid XML, but could not parse output. %s' % str(e)))

def assert_is_valid_xml ( output ) : try : to_xml ( output ) except Exception as e : raise AssertionError ( ( 'Expected valid XML, but could not parse output. %s' % str ( e ) ) )
simple assertion that just verifies the specified output is valid xml .