def get_current_test_name():
    """
    Utility to get the current test name.

    Instance names should be unique for proper test isolation.
    """
    name = os.environ["PYTEST_CURRENT_TEST"]

    # clean name to avoid issues with file creation:
    # "this/test.py::"{testname}" (call)"
    start = name.find("::") + 2
    end = name.find(" (call")
    name = name[start:end]
    return name

    Utility to get the current test name.

    Instance names should be unique for proper test isolation.
    
tests/test_cli.py