sure icon indicating copy to clipboard operation
sure copied to clipboard

context should have helper methods

Open gabrielfalcao opened this issue 12 years ago • 1 comments

the VariablesBag should have methods for

  • listing members
  • supporting either getattr or getitem

In other words, this test should pass:


from sure import scenario

def prepare(context):
    context["some_cool_variable"]= 123

def dismiss(context):
    context.list_members().should.equal(["some_cool_variable", "times_2"])

@scenario(prepare, dismiss)
def test_something(context):
    context.times_2 = context.some_cool_variable * 2

gabrielfalcao avatar Mar 15 '12 19:03 gabrielfalcao