Skip to content

Instantly share code, notes, and snippets.

@greeness
Last active December 19, 2015 18:09
Show Gist options
  • Select an option

  • Save greeness/5996433 to your computer and use it in GitHub Desktop.

Select an option

Save greeness/5996433 to your computer and use it in GitHub Desktop.
Behavior driven development
http://net.tutsplus.com/tutorials/python-tutorials/behavior-driven-development-in-python/
Note: feature files needs newline at each "given", "when", etc (otherwise you get errors like below:)
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/lettuce/core.py", line 143, in __call__
ret = self.function(self.step, *args, **kw)
File "/Users/greeness/Documents/workspace/hehe/tests/features/steps.py", line 9, in compute_its_fatorial
world.number = factorial(world.number)
AttributeError: 'thread._local' object has no attribute 'number'
https://groups.google.com/forum/#!msg/lettuce-users/aXHxMHyOD9I/6HuZgpjOs8kJ
http://pythonhosted.org/lettuce/tutorial/simple.html#lettuce-b-define-steps-in-python
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment