[lang-ref] ( get_current_directory ) ( python )

def test_get_current_directory(pushd):
    # os.getcwd
    os.chdir('/private/tmp')
    assert os.getcwd() == '/private/tmp'
def test_get_current_directory_alternative(pushd):
    # pathlib.Path.cwd()
    os.chdir('/private/tmp')
    assert Path.cwd() == Path('/private/tmp')