def test_push(): stack = Stack() stack.push('foo') stack.push('baar') assert_equal(stack.current, 'baar') stack.push('baz') assert_equal(list(stack.lookup()), ['foo', 'baar', 'baz'])
def test_lookup(): stack = Stack(['foo', 'bar', 'fooz', 'baz']) assert_equal(list(stack.lookup()), ['foo', 'bar', 'fooz', 'baz'])