semvec/pypi-packages huggingface dataset:
xmlunittest 1.0.1
Library using lxml and unittest for unit testing XML.
License: MIT
Requires Python: >=3.8

===================
Python XML-Unittest
===================

Anyone uses XML, for RSS, for configuration files, for... well, we all use XML
for our own reasons (folk says one can not simply uses XML, but still...).

So, your code generates XML, and everything is fine. As you follow best
practices (if you don’t, I think you should), you have written some good
unit-tests, where you compare code’s result with an expected result. I mean you
compare string with string. One day, something bad might happen.

XML is not a simple string, it is a structured document. One can not simply
compare two XML string and expect everything to be fine: attributes’s order can
change unexpectedly, elements can be optional, and no one can explain simply
how spaces and tabs works in XML formatting.

Here comes XML unittest TestCase: if you want to use the built-in unittest
package (or if it is a requirement), and you are not afraid of using xpath
expression with ``lxml``, this library is made for you.

You will be able to test your XML document, and use the power of xpath and
various schema languages to write tests that matter.


Links
=====

- Distribution: https://pypi.python.org/pypi/xmlunittest
- Documentation: http://python-xmlunittest.readthedocs.org/en/latest/
- Source: https://github.com/Exirel/python-xmlunittest


How to
======

- Extends ``xmlunittest.XmlTestCase``
- Write your tests, using the function or method that generate XML document
- Use ``xmlunittest.XmlTestCase``‘s assertion methods to validate
- Keep your tests readable

Example:

.. code-block:: python

    from xmlunittest import XmlTestCase


    class CustomTestCase(XmlTestCase):

        def test_my_custom_test(self):
            # In a real case, data come from a call to your function/method.
            data = """<?xml version="1.0" encoding="UTF-8" ?>
            <root xmlns:ns="uri">
                <leaf id="1" active="on" />
                <leaf id="2" active="on" />
                <leaf id="3" active="off" />
            </root>"""

            # Everything starts with `assertXmlDocument`
            root = self.assertXmlDocument(data.encode())

            # Check namespace
            self.assertXmlNamespace(root, 'ns', 'uri')
            # Check
            self.assertXpathsUniqueValue(root, ('./leaf/@id', ))
            self.assertXpathValues(root, './leaf/@active', ('on', 'off'))
jeugdjournaal 0.1.9
Python library to interact with the jeugdjournaal API
License: MIT
Requires Python: >=3.6

# Jeugdjournaal (Dutch Youth News) Python Library

A simple Python library for fetching and interacting with articles, polls, comments, and reactions from Jeugdjournaal, made by hcr5.

## Installation

You can install the library via pip:

```bash
pip install jeugdjournaal
```

## Example Usage

Here’s a quick example to get started:

```python
import jeugdjournaal

# Read an article
article = jeugdjournaal.read_item(2528544)
print(article.title)
print(article.content)

# Get poll IDs from the article
poll_ids = jeugdjournaal.get_poll_ids(2528544)
print(poll_ids.id_1)
print(poll_ids.id_2)

# Vote in a poll
jeugdjournaal.vote_in_poll(poll_ids.id_1["id"])
```

For more functions and detailed usage, refer to the [full documentation](https://github.com/hcr5/jeugdjournaal-python/blob/main/docs.md).