code: def test_hidden_doubleentry():
      # In above test due to 'choices' there were no double entry for a hidden
      out = StringIO()
      ui = DialogUI(out=out)
      with patch_getpass(return_value="ab") as gpcm:
          response = ui.question("?", hidden=True)
          eq_(response, "ab")
          gpcm.assert_has_calls([call("?: "), call("? (repeat): ")])
  
      # explicitly request no repeats
      with patch_getpass(return_value="ab") as gpcm:
          response = ui.question("?", hidden=True, repeat=False)
          eq_(response, "ab")
          gpcm.assert_has_calls([call("?: ")])
  
file_path: datalad/datalad/ui/tests/test_dialog.py
imports: import builtins
  from io import StringIO
  from unittest.mock import call, patch
  import pytest
  from datalad.ui.progressbars import progressbars
  from datalad.utils import swallow_logs
  from ...tests.utils_pytest import assert_in, assert_not_in, assert_raises, assert_re_in, eq_, ok_endswith, ok_startswith
  from ..dialog import ConsoleLog, DialogUI, IPythonUI
label_desc: Use image node_id 5 for calling a global function with example usage: test_hidden_doubleentry() without return types