LogoopenSUSE Build Service > Projects
Sign Up | Log In

Should assertions in Python as clear and readable as possible

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]

Source Files

Filename Size Changed Actions
python-should_dsl.changes 139 Bytes Download File
python-should_dsl.spec 2.5 KB Download File
should_dsl-2.0a4.tar.gz 23.1 KB Download File

Comments for home:thomas-schraitle (0)

Login required, please login or signup in order to comment