Parse, test, and assert RST code-blocks
Project description
Parse and test README.rst Python code-blocks
Installation
$ pip install readmetester
Code blocks need to begin with
.. code-block:: python
followed by a blank line
and end with
..
Usage
readmetester [-h] file
If a README.rst file is present in the current working directory it will be used if no arguments are provided
$ readmetester README.rst
Documenting
Documented code needs to be indented
Python code begins with ">>> "
Expected output can be single quoted or unquoted (no double quotes)
.. code-block:: python
>>> print("Hello, world!")
'Hello, world!'
..
Continuation lines begin with "... "
.. code-block:: python
>>> n = [
... "zero",
... "one",
... "two",
... ]
>>> for c, i in enumerate(n):
... print(c, i)
0 zero
1 one
2 two
..
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
readmetester-1.0.0.tar.gz
(7.4 kB
view hashes)
Built Distribution
Close
Hashes for readmetester-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40aae2c06b8975a286a322c2776201a909a846a1665127c1d27eaa43085be790 |
|
MD5 | c608658ad60e3367425f10114d05c2ee |
|
BLAKE2b-256 | 63de35ede43b3cc2b95ed033f861fef8551fe9923c9cef55ba7e216aef350a17 |