Skip to content

Instantly share code, notes, and snippets.

@timbertson
timbertson / makeshift_cucumber.py
Created January 26, 2011 06:49
This is just a quick hack, I hope to make it a proper library soon.
import unittest
class StepCollection(object):
def __setattr__(self, attr, val):
if hasattr(self, attr):
raise RuntimeError("step %s is already declared!" % (attr,))
return super(StepCollection, self).__setattr__(attr, val)
class Object(object): pass
class World(unittest.TestCase):
def __init__(self):