def fixture_change_dir(request: FixtureRequest) -> t.Generator[None, None, None]:
    """A fixture to change given test directory to the directory of the current running test."""
    os.chdir(
        request.fspath.dirname,  # type: ignore (bad pytest stubs)
    )
    yield
    os.chdir(
        request.config.invocation_dir,  # type: ignore (bad pytest stubs)
    )
A fixture to change given test directory to the directory of the current running test.
src/bentoml/testing/pytest/plugin.py