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 details)
Built Distribution
File details
Details for the file readmetester-1.0.0.tar.gz
.
File metadata
- Download URL: readmetester-1.0.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64d0721259b925787b43d3882b9cf8fe1bc1313ee0c58d24c5d0f096ff8341cb |
|
MD5 | 5275691890b04bc935515aeaa3ab8dce |
|
BLAKE2b-256 | ee6e6d6f28b11e29a2f9211787e378202f276bed9f511fc2ee25121bfb14af81 |
File details
Details for the file readmetester-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: readmetester-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40aae2c06b8975a286a322c2776201a909a846a1665127c1d27eaa43085be790 |
|
MD5 | c608658ad60e3367425f10114d05c2ee |
|
BLAKE2b-256 | 63de35ede43b3cc2b95ed033f861fef8551fe9923c9cef55ba7e216aef350a17 |