def test_rank_zero_priority(environ, expected_rank):
    """Test the priority in which the rank gets determined when multiple environment variables are available."""
    with mock.patch.dict(os.environ, environ):
        assert _get_rank() == expected_rank
Test the priority in which the rank gets determined when multiple environment variables are available.
tests/tests_fabric/utilities/test_rank_zero.py