human
I wrote the below code

    mox = Mox()
    old_os = io.os
    io.os = mox.CreateMockAnything()
    class MyFs(io.FileSystem, ):
        stack = []
        @classmethod
        def current_dir(cls):
            return 'should    be    current    dir'
    io.os.chdir('somewhere')
    mox.ReplayAll()
    try:
        assert (len(MyFs.stack) is 0)
        MyFs.pushd('somewhere')
        assert (len(MyFs.stack) is 2)
        assert_equals(MyFs.stack, ['should    be    current    dir', 'somewhere'])
        mox.VerifyAll()
    finally:
        io.os = old_os

What's a good function header?
assistant
#Here's a good function header.

def test_pushd_appends_current_dir_to_stack_if_empty():