No project description provided
Project description
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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rumex-0.7.0.tar.gz.
File metadata
- Download URL: rumex-0.7.0.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-36-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ceb4f53b39f1e1eab3a322f4e85835a2476b28b971a0ab4bab96bfbb665936f5
|
|
| MD5 |
c2cb135a52dac90cd4d51bc38c66eea4
|
|
| BLAKE2b-256 |
86085316787236eae9db9ab633cd0900dde17b31691953a55d4660e60648cb5e
|
File details
Details for the file rumex-0.7.0-py3-none-any.whl.
File metadata
- Download URL: rumex-0.7.0-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-36-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8128b8cf11ef580f07b1cf85b67e868d00c5d574c3f06d28a8416b486da4711f
|
|
| MD5 |
64f0245f43112b9ad2b311dfb46beb54
|
|
| BLAKE2b-256 |
000c9a37c0f3c92910bd7ffd95ecb6eb8c24f69ddcfa15472b3e6bc555291389
|