My own experiments led to pyspecs , a minimalistic approach. It is quite easy to get the job done:
pip install pyspecs
And it is quite easy to use:
from pyspecs import spec, given, when, then, the
class simple_addition (spec):
@given
def two_numbers (self):
self.first = 2
self.second = 3
@when
def we_add_them (self):
self.result = add (self.first, self.second)
@then
def the_sum_should_equal_5 (self):
the (self.result) .should.equal (5)
def add (a, b):
return a + b
I would welcome and draw attention / cooperation ...
mdwhatcott
source share