Rumex
Behaviour Driven Development (BDD) testing library.
Rumex is trying to be more of a library rather than a framework. This approach aims to increase flexibility and reduce dependency on design choices made by designers of alternative frameworks.
Installation
pip install rumex
Basic example
import rumex
example_file = rumex.InputFile(
text="""
Name: Basic example
Scenario: Simple arithmetics
Given an integer 1
And an integer 2
When addition is performed
Then the result is 3
""",
uri="in place file, just an example",
)
steps = rumex.StepMapper()
class Context:
def __init__(self):
self.integers = []
self.sum = None
@steps(r"an integer (\d+)")
def store_integer(integer: int, *, context: Context):
context.integers.append(integer)
@steps(r"addition is performed")
def add(*, context: Context):
context.sum = sum(context.integers)
@steps(r"the result is (\d+)")
def check_result(expected_result: int, *, context: Context):
assert expected_result == context.sum
rumex.run(
files=[example_file],
steps=steps,
context_maker=Context,
)
More examples
To discover Rumex's features you can look at the examples in docs/examples.
API
For API documentation see docs/api
Some alternatives
Release files for rumex 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rumex-0.7.0.tar.gz | 11.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rumex-0.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.6 kB
Release files / rumex-0.7.0.tar.gz
| Download URL | rumex-0.7.0.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ceb4f53b39f1e1eab3a322f4e85835a2476b28b971a0ab4bab96bfbb665936f5
|
|
BLAKE2b-256 checksum How to use checksums |
86085316787236eae9db9ab633cd0900dde17b31691953a55d4660e60648cb5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-36-generic
|
Release files / rumex-0.7.0-py3-none-any.whl
| Download URL | rumex-0.7.0-py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8128b8cf11ef580f07b1cf85b67e868d00c5d574c3f06d28a8416b486da4711f
|
|
BLAKE2b-256 checksum How to use checksums |
000c9a37c0f3c92910bd7ffd95ecb6eb8c24f69ddcfa15472b3e6bc555291389
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-36-generic
|