Should assertions in Python as clear and readable as possible

Edit Package python-should_dsl
http://github.com/hugobr/should-dsl

The goal of *Should-DSL* is to write should expectations in Python
as clear and readable as possible, using "almost" natural
language (limited - sometimes - by the Python language constraints).

For using this DSL, you need to import the should and should_not
objects from should_dsl module, or import all from should_dsl.

For example::

>>> from should_dsl import should

>>> 1 |should| equal_to(1)
>>> 'should' |should| include('oul')
>>> 3 |should| be_into([0, 1, 2])
Traceback (most recent call last):
...
ShouldNotSatisfied: 3 is not into [0, 1, 2]

Refresh
Refresh
Source Files
Filename Size Changed
python-should_dsl.changes 0000000139 139 Bytes
python-should_dsl.spec 0000002556 2.5 KB
should_dsl-2.0a4.tar.gz 0000023666 23.1 KB
Latest Revision
Thomas Schraitle's avatar Thomas Schraitle (thomas-schraitle) committed (revision 1)
- Initial version 2.0a4
Comments 0
openSUSE Build Service is sponsored by