def METHOD_NAME(tmp_path, monkeypatch):
    now_cwd = os.getcwd()
    t = str(tmp_path) + "/foo"
    os.mkdir(t)
    os.chdir(t)
    with cwd_in_path():
        assert os.path.exists(t) is True
    if sys.platform == "win32" or "Windows" in platform.platform():
        # If it is a Windows server, other processes cannot delete the current working directory being used by celery
        # . If you want to delete it, you need to terminate the celery process. If it is a Linux server, the current
        # working directory of celery can be deleted by other processes.
        pass
    else:
        os.rmdir(t)
        with cwd_in_path():
            assert os.path.exists(t) is False
    os.chdir(now_cwd)