{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/2"},{"label":"Quality Assurance","url":"https://skillfed.io/packages/category/software-development-quality-assurance/2"},{"label":"XML","url":"https://skillfed.io/packages/category/text-processing-markup-xml"},{"label":"Unit","url":"https://skillfed.io/packages/category/software-development-testing-unit"}],"enrichment":{"capability":"Extends Python's unittest framework to compare XML documents structurally using XPath expressions and lxml, rather than comparing raw XML strings.","skillfed_tags":["xml-testing","xpath-assertions"],"use_cases":["Test XML output from code that generates configuration files, RSS feeds, or SOAP responses without brittle string comparisons.","Validate that XML documents conform to expected namespaces and element structures using XPath queries.","Check that optional XML elements and attributes are present or absent as expected in unit tests.","Ensure attribute values match a set of allowed options across multiple elements in a single assertion.","Verify uniqueness constraints on XML attributes across a document tree using XPath expressions."],"what_it_does":"xmlunittest is a TestCase subclass that adds assertion methods for validating XML documents as structured data rather than raw strings. It uses lxml and XPath to let you write tests that check namespaces, element values, attribute presence, and document structure without being brittle to formatting changes or attribute reordering.\n\nYou extend XmlTestCase, call assertXmlDocument() to parse your XML, then use methods like assertXpathValues(), assertXmlNamespace(), and assertXpathsUniqueValue() to validate specific parts of the tree. This is useful when your code generates XML and you want tests that survive cosmetic changes to the output while still catching structural problems.","worth_installing":"Yes, if you generate XML and use unittest. The package is stable, has no known vulnerabilities, and low install friction. Dormant maintenance is a minor concern\u2014it suggests no active development, but the core functionality is straightforward and unlikely to break. Use it when string-based XML comparison would be fragile or unreadable."},"id":"xmlunittest","links":{"html":"https://skillfed.io/packages/xmlunittest","md":"https://skillfed.io/packages/xmlunittest.md","pypi":"https://pypi.org/project/xmlunittest/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2024-07-13","license_spdx":null,"license_treatment":"permissive","name":"xmlunittest","python_support":"supports_current","summary":"Library using lxml and unittest for unit testing XML."},"popularity":{"monthly_downloads":1001212,"position":4537,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.0.1"}
