No project description provided
Project description
Behaviour Driven Development (BDD) testing library.
Rumex is a lightweight library alternative to an existing framework behave.
Basic example
import rumex
example_file = rumex.InputFile(
text='''
Name: Example file
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()
@steps(r'an integer (\d+)')
def store_integer(integer: int, integers=None):
integers = integers or []
integers.append(integer)
return dict(integers=integers)
@steps(r'addition is performed')
def add(integers):
return dict(result=sum(integers))
@steps(r'the result is (\d+)')
def check_result(expected_result: int, *, result):
assert expected_result == result
rumex.run(
files=[example_file],
steps=steps,
)
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
rumex-0.1.1.tar.gz
(7.2 kB
view hashes)
Built Distribution
rumex-0.1.1-py3-none-any.whl
(8.4 kB
view hashes)