code: def test_display_empty_macosx(monkeypatch):
      """
      Check that an exception is raised if xvfbwrapper is necessary
      (no config and $DISPLAY unset) but platform is OSX. See
      https://github.com/nipy/nipype/issues/1400
      """
      config._display = None
      if config.has_option("execution", "display_variable"):
          config._config.remove_option("execution", "display_variable")
      monkeypatch.delenv("DISPLAY", "")
  
      monkeypatch.setattr(sys, "platform", "darwin")
      with pytest.raises(RuntimeError):
          config.get_display()
  
file_path: nipype/nipype/utils/tests/test_config.py
imports: import os
  import sys
  import pytest
  from nipype import config
  from unittest.mock import MagicMock
label_desc: Use image node_id 13 for calling a global function with example usage: test_display_empty_macosx(monkeypatch) without return types