S
Analyzed 2 months ago
Should DSL implemented in Python
The goal is to write a "should" DSL in Python to be as clear as possible.
should-dsl is at github.com
Due to DVCS I moved should-dsl to github.com. I will try to maintain both repositories up to date, but the github will be the main one.
You can get it at:
... [More]
http://github.com/hugobr/should-dsl
It would be good to be as close as:
SOME_VALUE should be equal to ANOTHER VALUE
or
SOME_EXCEPTION should be thrown by SOME_CALLABLE
or
SOME_VALUE should not be into SOME_CONTAINER
For using this DSL as transparently as possible, you must import on this way:
from should_dsl import *
Some examples using doctest follow:
Should with equal_to:
>>> 1 |should_be.equal_to| 1
True
>>> 2 |should_be.equal_to| 3... [Less]