def test_storing_1 (self): test = NotifyTestObject () variable = Variable () variable.value = 100 with variable.storing (test.simple_handler): variable.value = 200 variable.value = 300 test.assert_results (100, 200)
def test_storing_1(self): test = NotifyTestObject() variable = Variable() variable.value = 100 with variable.storing(test.simple_handler): variable.value = 200 variable.value = 300 test.assert_results(100, 200)
def test_storing_2 (self): test = NotifyTestObject () variable = Variable () variable.value = 100 with nested (ignoring_exceptions (), variable.storing (test.simple_handler)): variable.value = 200 raise Exception variable.value = 300 test.assert_results (100, 200)
def test_storing_2(self): test = NotifyTestObject() variable = Variable() variable.value = 100 with nested(ignoring_exceptions(), variable.storing(test.simple_handler)): variable.value = 200 raise Exception variable.value = 300 test.assert_results(100, 200)